mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 06:42:12 +00:00
Fix: Issue with push notifications on Android
Some checks failed
Flutter analyze & test / flutter_analyze_and_test (push) Has been cancelled
Some checks failed
Flutter analyze & test / flutter_analyze_and_test (push) Has been cancelled
This commit is contained in:
parent
e6a468c065
commit
4d9c356400
4 changed files with 16 additions and 2 deletions
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## 0.2.10
|
||||
|
||||
- Fix: Issue with push notifications on Android
|
||||
|
||||
## 0.2.9
|
||||
|
||||
- Improved: Make contact avatars clickable
|
||||
|
|
|
|||
|
|
@ -133,7 +133,11 @@ class _AppMainWidgetState extends State<AppMainWidget> {
|
|||
Future<void> initAsync() async {
|
||||
Log.info('AppWidgetState: initAsync started');
|
||||
if (userService.isUserCreated) {
|
||||
unawaited(FirebaseMessaging.instance.requestPermission());
|
||||
try {
|
||||
unawaited(FirebaseMessaging.instance.requestPermission());
|
||||
} catch (e) {
|
||||
Log.error(e);
|
||||
}
|
||||
if (_isTwonlyLocked) {
|
||||
// do not change in case twonly was already unlocked at some point
|
||||
_isTwonlyLocked = userService.currentUser.screenLockEnabled;
|
||||
|
|
|
|||
|
|
@ -9,18 +9,24 @@ class AppEnvironment {
|
|||
static late final String cacheDir;
|
||||
static late final String supportDir;
|
||||
|
||||
static bool _isInitialized = false;
|
||||
|
||||
// will be loaded in the main_camera_controller.dart
|
||||
static List<CameraDescription> cameras = [];
|
||||
|
||||
static Future<void> init() async {
|
||||
if (_isInitialized) return;
|
||||
cacheDir = (await getApplicationCacheDirectory()).path;
|
||||
supportDir = (await getApplicationSupportDirectory()).path;
|
||||
Log.init();
|
||||
_isInitialized = true;
|
||||
}
|
||||
|
||||
static void initTesting() {
|
||||
if (_isInitialized) return;
|
||||
cacheDir = '/tmp/twonly_cache';
|
||||
supportDir = '/tmp/twonly_support';
|
||||
_isInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ description: "twonly, a privacy-friendly way to connect with friends through sec
|
|||
|
||||
publish_to: 'none'
|
||||
|
||||
version: 0.2.9+118
|
||||
version: 0.2.10+119
|
||||
|
||||
environment:
|
||||
sdk: ^3.11.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue