mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 11:18:41 +00:00
fix #64
This commit is contained in:
parent
e9e21d97a2
commit
a407a3fbea
3 changed files with 8 additions and 0 deletions
|
|
@ -99,6 +99,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||
if (state == AppLifecycleState.resumed) {
|
||||
if (wasPaused) {
|
||||
globalIsAppInBackground = false;
|
||||
twonlyDatabase.markUpdated();
|
||||
apiProvider.connect();
|
||||
// _stopService();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,9 @@ class TwonlyDatabase extends _$TwonlyDatabase {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
void markUpdated() {
|
||||
notifyUpdates({TableUpdate.onTable(messages, kind: UpdateKind.update)});
|
||||
notifyUpdates({TableUpdate.onTable(contacts, kind: UpdateKind.update)});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import 'dart:math';
|
|||
import 'package:fixnum/fixnum.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:twonly/globals.dart';
|
||||
import 'package:twonly/src/app.dart';
|
||||
import 'package:twonly/src/proto/api/client_to_server.pbserver.dart';
|
||||
import 'package:twonly/src/proto/api/error.pb.dart';
|
||||
|
|
@ -77,6 +78,7 @@ class ApiProvider {
|
|||
retransmitMediaFiles();
|
||||
tryDownloadAllMediaFiles();
|
||||
notifyContactsAboutProfileChange();
|
||||
twonlyDatabase.markUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue