Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update changelog #289

Merged
merged 18 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/build-fat-apk-android-beta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Add Fat APK for Beta build
on:
release:
types: [published]
workflow_dispatch:

jobs:
build:
runs-on: "ubuntu-latest"
environment: Android release
steps:
- uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/[email protected]
with:
distribution: "zulu"
java-version: "17"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Set release tag name
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- run: flutter pub get
- name: Run tests
run: |
bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-dart/main/install.sh)
flutter test
- name: Setup secrets
run: |
echo "${{ secrets.SIGNING_KEY_PROPERTIES }}" > ./android/key.properties
echo "${{ secrets.SIGNING_KEYSTORE }}" | base64 --decode > ./android/flow-upload-keystore.jks
- name: Build fat APK
run: flutter build apk --release --no-tree-shake-icons
- name: Upload file to release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload ${{ env.RELEASE_TAG }} ./build/app/outputs/flutter-apk/app-release.apk
gh release upload ${{ env.RELEASE_TAG }} ./build/app/outputs/flutter-apk/app-release.apk.sha1
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# Changelog

## Beta 0.11.0 (next)
## Next

### New fetures

* Now you can use OLED themes, close [#288](https://github.com/flow-mn/flow/issues/288)

## Beta 0.11.0

* Reworked stats tab (ongoing)
* Enhanced search options (ongoing)
* Added partial and exact match mode
* Added option to include description, closes [#269](https://github.com/flow-mn/flow/issues/269)
At the time, it will only do substring (partial) matching.
* Now you can group transcations by hour, day, week, month, and year, closes [#256](https://github.com/flow-mn/flow/issues/256)
* Fixed that the default filters weren't updating when the day changes (at 00:00)

## Beta 0.10.2

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (keystorePropertiesFile.exists()) {

android {
namespace "mn.flow.flow"
compileSdkVersion 34
compileSdkVersion 35
ndkVersion "27.0.12077973"

compileOptions {
Expand All @@ -52,7 +52,7 @@ android {
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 23
targetSdkVersion 34
targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
1 change: 1 addition & 0 deletions assets/l10n/en_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
"preferences.theme.other": "Other themes",
"preferences.theme.themeChangesAppIcon": "App icon follows theme",
"preferences.theme.enableDynamicTheme": "Dynamic theme",
"preferences.theme.enableOledTheme": "Use OLED theme",
"preferences.numpad": "Numpad",
"preferences.numpad.layout": "Numpad layout",
"preferences.numpad.layout.classic": "Classic",
Expand Down
1 change: 1 addition & 0 deletions assets/l10n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
"preferences.theme.other": "Other themes",
"preferences.theme.themeChangesAppIcon": "App icon follows theme",
"preferences.theme.enableDynamicTheme": "Dynamic theme",
"preferences.theme.enableOledTheme": "Use OLED theme",
"preferences.numpad": "Numpad",
"preferences.numpad.layout": "Numpad layout",
"preferences.numpad.layout.classic": "Classic",
Expand Down
1 change: 1 addition & 0 deletions assets/l10n/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
"preferences.theme.other": "Altri temi",
"preferences.theme.themeChangesAppIcon": "Icona dell'app segue il tema",
"preferences.theme.enableDynamicTheme": "Tema dinamico",
"preferences.theme.enableOledTheme": "Usa tema OLED",
"preferences.numpad": "Tastierino numerico",
"preferences.numpad.layout": "Layout del tastierino numerico",
"preferences.numpad.layout.classic": "Classico",
Expand Down
1 change: 1 addition & 0 deletions assets/l10n/mn_MN.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
"preferences.theme.other": "Бусад үзэмжүүд",
"preferences.theme.themeChangesAppIcon": "Аппын дүрс дагаж өөрчлөх",
"preferences.theme.enableDynamicTheme": "Динамик үзэмж",
"preferences.theme.enableOledTheme": "OLED горим",
"preferences.numpad": "Тоон товчлуур",
"preferences.numpad.layout": "Тооны байрлал",
"preferences.numpad.layout.classic": "Хуучны",
Expand Down
1 change: 1 addition & 0 deletions assets/l10n/tr_TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
"preferences.theme.other": "Diğer temalar",
"preferences.theme.themeChangesAppIcon": "Uygulama simgesi temayı takip eder",
"preferences.theme.enableDynamicTheme": "Dinamik tema",
"preferences.theme.enableOledTheme": "OLED temasını kullan",
"preferences.numpad": "Sayısal tuş takımı",
"preferences.numpad.layout": "Sayısal tuş takımı düzeni",
"preferences.numpad.layout.classic": "Klasik",
Expand Down
7 changes: 6 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,15 @@ class FlowState extends State<Flow> {

void _reloadTheme() {
final String? themeName = LocalPreferences().themeName.value;
final bool oled = LocalPreferences().enableOledTheme.get();

log("[Theme] Reloading theme $themeName");

FlowColorScheme theme = getTheme(themeName, useDarkTheme);
FlowColorScheme theme = getTheme(
themeName,
preferDark: useDarkTheme,
preferOled: oled,
);

setState(() {
_themeMode = theme.mode;
Expand Down
6 changes: 6 additions & 0 deletions lib/prefs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class LocalPreferences {
late final PrimitiveSettingsEntry<String> themeName;
late final BoolSettingsEntry themeChangesAppIcon;
late final BoolSettingsEntry enableDynamicTheme;
late final BoolSettingsEntry enableOledTheme;

late final BoolSettingsEntry requirePendingTransactionConfrimation;

Expand Down Expand Up @@ -188,6 +189,11 @@ class LocalPreferences {
preferences: _prefs,
initialValue: true,
);
enableOledTheme = BoolSettingsEntry(
key: "enableOledTheme",
preferences: _prefs,
initialValue: false,
);

requirePendingTransactionConfrimation = BoolSettingsEntry(
key: "requirePendingTransactionConfrimation",
Expand Down
45 changes: 37 additions & 8 deletions lib/routes/preferences/theme_preferences_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class _ThemePreferencesPageState extends State<ThemePreferencesPage> {
bool busy = false;
bool appIconBusy = false;
bool dynamicThemeBusy = false;
bool oledThemeBusy = false;

@override
void initState() {
Expand All @@ -28,8 +29,11 @@ class _ThemePreferencesPageState extends State<ThemePreferencesPage> {
@override
Widget build(BuildContext context) {
final String currentTheme = LocalPreferences().getCurrentTheme();
final bool isDark = getTheme(currentTheme).isDark;

final bool themeChangesAppIcon =
LocalPreferences().themeChangesAppIcon.get();
final bool enableOledTheme = LocalPreferences().enableOledTheme.get();
// final bool enableDynamicTheme = LocalPreferences().enableDynamicTheme.get();

return Scaffold(
Expand All @@ -54,6 +58,14 @@ class _ThemePreferencesPageState extends State<ThemePreferencesPage> {
secondary: Icon(Symbols.photo_prints_rounded),
activeColor: context.colorScheme.primary,
),
CheckboxListTile.adaptive(
title: Text("preferences.theme.enableOledTheme".t(context)),
value: enableOledTheme,
onChanged: changeEnableOledTheme,
secondary: Icon(Symbols.brightness_4),
activeColor: context.colorScheme.primary,
enabled: isDark,
),
// CheckboxListTile.adaptive(
// title: Text("preferences.theme.enableDynamicTheme".t(context)),
// value: enableDynamicTheme,
Expand All @@ -65,12 +77,14 @@ class _ThemePreferencesPageState extends State<ThemePreferencesPage> {
ListHeader(
"preferences.theme.other".t(context),
),
RadioListTile.adaptive(
title: Text(palenight.name),
value: "palenight",
groupValue: currentTheme,
onChanged: (value) => handleChange(value),
activeColor: context.colorScheme.primary,
...otherThemes.entries.map(
(entry) => RadioListTile.adaptive(
title: Text(entry.value.name),
value: entry.key,
groupValue: currentTheme,
onChanged: (value) => handleChange(value),
activeColor: context.colorScheme.primary,
),
),
],
),
Expand All @@ -95,13 +109,13 @@ class _ThemePreferencesPageState extends State<ThemePreferencesPage> {
}
}

void changeEnableDynamicTheme(bool? newValue) {
void changeEnableDynamicTheme(bool? newValue) async {
if (newValue == null) return;
if (dynamicThemeBusy) return;

try {
dynamicThemeBusy = true;
LocalPreferences().enableDynamicTheme.set(newValue);
await LocalPreferences().enableDynamicTheme.set(newValue);
} finally {
dynamicThemeBusy = false;
if (mounted) {
Expand All @@ -110,6 +124,21 @@ class _ThemePreferencesPageState extends State<ThemePreferencesPage> {
}
}

void changeEnableOledTheme(bool? newValue) async {
if (newValue == null) return;
if (oledThemeBusy) return;

try {
oledThemeBusy = true;
await LocalPreferences().enableOledTheme.set(newValue);
} finally {
oledThemeBusy = false;
if (mounted) {
setState(() {});
}
}
}

void handleChange(String? name) async {
if (name == null) return;
if (busy) return;
Expand Down
Loading