Skip to content

Commit

Permalink
v1.9.1 (#297)
Browse files Browse the repository at this point in the history
* fix: preferences type conversion error

* chore: update fastlane

* chore: bump application version

* chore: add changelogs

* chore: update RELEASING.md
  • Loading branch information
maelchiotti authored Dec 11, 2024
1 parent 621bbed commit 7a4c7d3
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 19 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.9.0 - 2024-12-09
## 1.9.1 - 2024-12-11

### Fixed

- Crash when loading the theming preference

## 1.9.0 - 2024-12-11

### Added

Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.1013.0)
aws-sdk-core (3.213.0)
aws-partitions (1.1021.0)
aws-sdk-core (3.214.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.173.0)
aws-sdk-s3 (1.176.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand Down Expand Up @@ -68,7 +68,7 @@ GEM
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.225.0)
fastlane (2.226.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -108,7 +108,7 @@ GEM
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty (~> 0.4.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
Expand Down Expand Up @@ -150,11 +150,11 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.7)
http-cookie (1.0.8)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.8.2)
json (2.9.0)
jwt (2.9.3)
base64
mini_magick (4.13.2)
Expand All @@ -175,7 +175,7 @@ GEM
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.3.9)
rouge (2.0.7)
rouge (3.28.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.5)
Expand Down Expand Up @@ -206,8 +206,8 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty (0.4.0)
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)

Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

### Screenshots

- [ ] Update [`screenshotNotes`](lib/common/constants/notes.dart)
- [ ] Update screenshot [notes](lib/common/constants/notes.dart) and [labels](lib/common/constants/labels.dart)
- [ ] Update fastlane screenshots
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/201.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FIXED
- Crash when loading the theming preference
2 changes: 2 additions & 0 deletions fastlane/metadata/android/fr-FR/changelogs/201.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CORRIGÉ
- Crash lors du chargement de la préférence du thème
2 changes: 1 addition & 1 deletion lib/common/navigation/app_bars/notes_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'package:localmaterialnotes/routing/routes/notes/notes_route.dart';
import 'package:localmaterialnotes/routing/routes/shell/shell_route.dart';
import 'package:localmaterialnotes/utils/keys.dart';

import '../../../providers/preferences/watched_preferences.dart';
import '../../preferences/watched_preferences.dart';

/// Notes list and bin's app bar.
///
Expand Down
13 changes: 12 additions & 1 deletion lib/common/preferences/preferences_utils.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:localmaterialnotes/common/constants/constants.dart';
import 'package:localmaterialnotes/common/preferences/preference_key.dart';
import 'package:shared_preferences/shared_preferences.dart';

Expand Down Expand Up @@ -58,7 +59,17 @@ class PreferencesUtils {
throw ArgumentError('The preference is securely stored, use getSecure() instead');
}

return _preferences.get(preferenceKey.name) as T?;
try {
return _preferences.get(preferenceKey.name) as T?;
}
// On type conversion error, reset the preference to its default value
on TypeError catch (error) {
logger.e('Conversion error while getting the value of a preference', error, error.stackTrace);

preferenceKey.reset();

return null;
}
}

/// Returns the value of the securely stored [preferenceKey].
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/settings/pages/settings_accessibility_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import 'package:localmaterialnotes/common/constants/paddings.dart';
import 'package:localmaterialnotes/common/navigation/app_bars/basic_app_bar.dart';
import 'package:localmaterialnotes/common/navigation/top_navigation.dart';
import 'package:localmaterialnotes/common/preferences/preference_key.dart';
import 'package:localmaterialnotes/common/preferences/watched_preferences.dart';
import 'package:localmaterialnotes/providers/preferences/preferences_provider.dart';
import 'package:localmaterialnotes/providers/preferences/watched_preferences.dart';
import 'package:localmaterialnotes/utils/keys.dart';
import 'package:localmaterialnotes/utils/locale_utils.dart';
import 'package:settings_tiles/settings_tiles.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/settings/pages/settings_appearance_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import 'package:localmaterialnotes/common/enums/localization_completion.dart';
import 'package:localmaterialnotes/common/navigation/app_bars/basic_app_bar.dart';
import 'package:localmaterialnotes/common/navigation/top_navigation.dart';
import 'package:localmaterialnotes/common/preferences/preference_key.dart';
import 'package:localmaterialnotes/common/preferences/watched_preferences.dart';
import 'package:localmaterialnotes/l10n/app_localizations/app_localizations.g.dart';
import 'package:localmaterialnotes/providers/preferences/preferences_provider.dart';
import 'package:localmaterialnotes/providers/preferences/watched_preferences.dart';
import 'package:localmaterialnotes/utils/keys.dart';
import 'package:localmaterialnotes/utils/locale_utils.dart';
import 'package:localmaterialnotes/utils/theme_utils.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/settings/pages/settings_behavior_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import 'package:localmaterialnotes/common/preferences/preference_key.dart';
import 'package:localmaterialnotes/utils/keys.dart';
import 'package:settings_tiles/settings_tiles.dart';

import '../../../common/preferences/watched_preferences.dart';
import '../../../providers/preferences/preferences_provider.dart';
import '../../../providers/preferences/watched_preferences.dart';

/// Settings related to the behavior of the application.
class SettingsBehaviorPage extends ConsumerStatefulWidget {
Expand Down
2 changes: 1 addition & 1 deletion lib/providers/preferences/preferences_provider.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:localmaterialnotes/providers/preferences/watched_preferences.dart';
import 'package:localmaterialnotes/common/preferences/watched_preferences.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'preferences_provider.g.dart';
Expand Down
14 changes: 14 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gen_build:
gen_watch:
dart run build_runner watch --delete-conflicting-outputs


# Assets generation
.PHONY: gen_icon gen_splash gen_full_descriptions

Expand All @@ -24,18 +25,31 @@ gen_splash:
gen_full_descriptions:
py scripts/generate_full_description.py


# Tests
.PHONY: test_all

test_all:
patrol test -t integration_test --dart-define=INTEGRATION_TEST=true


# Build
.PHONY: release

release:
flutter build apk --release


# Update
.PHONY: update_flutter update_fastlane

update_flutter:
flutter upgrade --force

update_fastlane:
bundle update fastlane


# Miscellaneous
.PHONY: clean

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: localmaterialnotes
description: Simple, local, material design notes
repository: https://github.com/maelchiotti/LocalMaterialNotes

version: 1.9.0+20
version: 1.9.1+21
publish_to: none

environment:
Expand Down

0 comments on commit 7a4c7d3

Please sign in to comment.