Skip to content

Commit ce78b6a

Browse files
authored
Merge pull request #263 from flow-mn/develop
add test mode
2 parents 8279cc9 + c91e826 commit ce78b6a

14 files changed

Lines changed: 469 additions & 32 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## Beta 0.10.1
4+
5+
### New features
6+
7+
* Added Turkish language [#259](https://github.com/flow-mn/flow/issues/259) by @winstreakers
8+
9+
### Changes and improvements
10+
11+
* Now checking `Prefer full amounts` in Money formatting settings makes daily summaries
12+
show full amounts. Closes [#255](https://github.com/flow-mn/flow/issues/255)
13+
* Now importing data triggers frecency data to update.
14+
15+
### Fixes
16+
17+
* Account tab "Total balance" no longer shows stale data
18+
319
## Beta 0.10.0
420

521
### New features

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Download Flow (beta)
88

9-
[![Join Play Store Open Testing](https://img.shields.io/badge/Google_Play-open_testing-f5ccff?logo=google-play&logoColor=white&style=for-the-badge)](https://play.google.com/store/apps/details?id=mn.flow.flow)
9+
[![Google Play Store](https://img.shields.io/badge/Google_Play-open_testing-f5ccff?logo=google-play&logoColor=white&style=for-the-badge)](https://play.google.com/store/apps/details?id=mn.flow.flow)
1010
[![Join TestFlight group](https://img.shields.io/badge/TestFlight-beta_testing-f5ccff?logo=appstore&logoColor=white&style=for-the-badge)](https://testflight.apple.com/join/NH4ifijS)
1111
[![See Codemagic builds](https://img.shields.io/badge/CodeMagic-see_builds-f5ccff?logo=codemagic&logoColor=white&style=for-the-badge)](https://codemagic.io/apps/65950ed30591c25df05b5613/65950ed30591c25df05b5612/latest_build)
1212

@@ -27,17 +27,16 @@ Beta available on Android, iOS, and more[^1]
2727
* JSON for backup
2828
* CSV for external software use (i.e., Google Sheets)
2929

30-
## Try Beta version
30+
## Try Flow
3131

32-
We've release Flow beta on March 6. You can download the
33-
[beta builds for iOS and Android](#download-flow-beta) right now.
34-
Beta version features all the basic functionality for an expense tracker app.
35-
JSON backups from Alpha and Beta versions are guaranteed to be supported
36-
by the next major releases, until Production.
32+
Flow will be available in App Store soon. In the meantime,
33+
please download Flow from TestFlight. Android users should
34+
have no major issues downloading Flow, but it will be available
35+
on the Google Play's production track.
3736

3837
Feedbacks and ideas are greatly appreciated 🌟
3938

40-
See what's coming on [Flow's next release](https://github.com/flow-mn/flow/milestone/2)
39+
Flow in production: [Blog post](https://blog.gege.mn/publishing-flow-to-production-20250104?showSharer=true)
4140

4241
## Supported platforms
4342

assets/l10n/tr_TR.json

Lines changed: 372 additions & 0 deletions
Large diffs are not rendered by default.

ios/Runner/Info.plist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<string>en</string>
88
<string>mn</string>
99
<string>it</string>
10+
<string>tr</string>
1011
</array>
1112
<key>CFBundleDevelopmentRegion</key>
1213
<string>$(DEVELOPMENT_LANGUAGE)</string>

lib/l10n/extensions.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ final Map<String, (String, String)> _localeNames = {
1414
"en_US": ("English (US)", "English (US)"),
1515
"en_IN": ("English (India)", "English (India)"),
1616
"it_IT": ("Italian (Italy)", "Italiano (Italia)"),
17+
"tr_TR": ("Turkish (Turkey)", "Türkçe (Türkiye)"),
1718
};
1819

1920
extension Underscore on Locale {

lib/l10n/flow_localizations.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class FlowLocalizations {
7070
Locale("mn", "MN"),
7171
Locale("it", "IT"),
7272
Locale("en", "IN"),
73+
Locale("tr", "TR"),
7374
];
7475

7576
static FlowLocalizations of(BuildContext context) =>

lib/routes/home/stats_tab/pie_graph_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class PieGraphView extends StatelessWidget {
3939

4040
if (associatedData is Category) {
4141
context.push(
42-
"/category/${associatedData.id}?range=${Uri.encodeQueryComponent(range.toString())}");
42+
"/category/${associatedData.id}?range=${Uri.encodeQueryComponent(range.encodeShort())}");
4343
}
4444
},
4545
),

lib/routes/setup/setup_profile_page.dart

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import "package:flow/form_validators.dart";
55
import "package:flow/l10n/extensions.dart";
66
import "package:flow/objectbox.dart";
77
import "package:flow/objectbox/objectbox.g.dart";
8+
import "package:flow/prefs.dart";
9+
import "package:flow/utils/utils.dart";
810
import "package:flow/widgets/general/button.dart";
911
import "package:flutter/material.dart";
1012
import "package:go_router/go_router.dart";
@@ -24,6 +26,8 @@ class _SetupProfilePageState extends State<SetupProfilePage> {
2426

2527
final GlobalKey<FormState> formKey = GlobalKey();
2628

29+
bool testMode = false;
30+
2731
bool busy = false;
2832

2933
@override
@@ -48,13 +52,31 @@ class _SetupProfilePageState extends State<SetupProfilePage> {
4852
child: Form(
4953
key: formKey,
5054
child: SingleChildScrollView(
51-
padding: const EdgeInsets.all(16.0),
52-
child: TextFormField(
53-
controller: _textEditingController,
54-
autofocus: true,
55-
validator: validateRequiredField,
56-
textInputAction: TextInputAction.send,
57-
onFieldSubmitted: (value) => save(),
55+
padding: const EdgeInsets.symmetric(vertical: 16.0),
56+
child: Column(
57+
children: [
58+
Padding(
59+
padding: const EdgeInsets.symmetric(horizontal: 16.0),
60+
child: TextFormField(
61+
controller: _textEditingController,
62+
autofocus: true,
63+
validator: validateRequiredField,
64+
textInputAction: TextInputAction.send,
65+
onFieldSubmitted: (value) => save(),
66+
),
67+
),
68+
const SizedBox(height: 16.0),
69+
if (_textEditingController.text.trim().toLowerCase() == "test")
70+
CheckboxListTile.adaptive(
71+
title: Text("Enable demo mode"),
72+
value: testMode,
73+
onChanged: (value) {
74+
setState(() {
75+
testMode = value ?? testMode;
76+
});
77+
},
78+
),
79+
],
5880
),
5981
),
6082
),
@@ -99,7 +121,15 @@ class _SetupProfilePageState extends State<SetupProfilePage> {
99121
final updatedProfile =
100122
await ObjectBox().box<Profile>().putAndGetAsync(_currentlyEditing!);
101123

102-
if (mounted) {
124+
if (testMode) {
125+
unawaited(LocalPreferences().primaryCurrency.set("USD"));
126+
unawaited(ObjectBox().createAndPutDebugData());
127+
if (mounted) {
128+
GoRouter.of(context).popUntil((route) => route.path == "/setup");
129+
130+
context.pushReplacement("/");
131+
}
132+
} else if (mounted) {
103133
await context.push(
104134
"/setup/profile/photo",
105135
extra: updatedProfile.imagePath,

lib/sync/import/import_v1.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import "dart:async";
12
import "dart:developer";
23

34
import "package:flow/entity/account.dart";
@@ -7,6 +8,7 @@ import "package:flow/entity/transaction.dart";
78
import "package:flow/l10n/named_enum.dart";
89
import "package:flow/objectbox.dart";
910
import "package:flow/objectbox/objectbox.g.dart";
11+
import "package:flow/prefs.dart";
1012
import "package:flow/sync/exception.dart";
1113
import "package:flow/sync/import/base.dart";
1214
import "package:flow/sync/import/mode.dart";
@@ -139,6 +141,14 @@ class ImportV1 extends Importer {
139141
progressNotifier.value = ImportV1Progress.writingTransactions;
140142
await ObjectBox().box<Transaction>().putManyAsync(transformedTransactions);
141143

144+
unawaited(
145+
LocalPreferences().updateTransitiveProperties().catchError((error) {
146+
log(
147+
"[Flow Sync Import v2] Failed to update transitive properties, ignoring",
148+
error: error,
149+
);
150+
}));
151+
142152
progressNotifier.value = ImportV1Progress.success;
143153
}
144154

lib/sync/import/import_v2.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ class ImportV2 extends Importer {
182182
}
183183
}
184184

185+
unawaited(
186+
LocalPreferences().updateTransitiveProperties().catchError((error) {
187+
log(
188+
"[Flow Sync Import v2] Failed to update transitive properties, ignoring",
189+
error: error,
190+
);
191+
}));
192+
185193
if (assetsRoot != null) {
186194
progressNotifier.value = ImportV2Progress.copyingImages;
187195
try {

0 commit comments

Comments
 (0)