mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-26 02:30:00 +08:00
Always check for changes on the desktop
The folder isn't hidden away like on ios/Android by default.
This commit is contained in:
@ -332,9 +332,16 @@ class GitJournalRepo with ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool _shouldCheckForChanges() {
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
return !storageConfig.storeInternally;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Future<void> syncNotes({bool doNotThrow = false}) async {
|
||||
// This is extremely slow with dart-git, can take over a second!
|
||||
if (!storageConfig.storeInternally) {
|
||||
if (_shouldCheckForChanges()) {
|
||||
var repoR = await GitRepository.load(repoPath);
|
||||
if (repoR.isFailure) {
|
||||
Log.e("SyncNotes Failed to Load Repo", result: repoR);
|
||||
|
Reference in New Issue
Block a user