Skip to content

Commit 77a5cde

Browse files
committed
Only get notes when app is unlocked
Signed-off-by: Fabian Diener <[email protected]>
1 parent 9e0f72e commit 77a5cde

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565

6666
import it.niedermann.android.util.ColorUtil;
6767
import it.niedermann.owncloud.notes.LockedActivity;
68+
import it.niedermann.owncloud.notes.NotesApplication;
6869
import it.niedermann.owncloud.notes.R;
6970
import it.niedermann.owncloud.notes.accountpicker.AccountPickerListener;
7071
import it.niedermann.owncloud.notes.accountswitcher.AccountSwitcherDialog;
@@ -292,7 +293,9 @@ protected void onCreate(Bundle savedInstanceState) {
292293
});
293294
});
294295

295-
getNotesListLiveData();
296+
if (!NotesApplication.isLocked()) {
297+
getNotesListLiveData();
298+
}
296299
mainViewModel.getSearchTerm().observe(this, adapter::setHighlightSearchQuery);
297300
mainViewModel.getCategorySortingMethodOfSelectedCategory().observe(this, methodOfCategory -> {
298301
updateSortMethodIcon(methodOfCategory.second);

0 commit comments

Comments
 (0)