Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2020-10-14 11:13:40 +0300
committerStefan Niedermann <info@niedermann.it>2020-10-14 11:13:40 +0300
commit790155807ec00a911864036af4f1e3ef28f7af35 (patch)
tree9aa632103352c2f63380638e4cf38c7c133d8727 /app/src/main/java/it/niedermann/owncloud/notes/widget
parent7b39fc5139b6ff267be552bdb4e615ff0e9ee53a (diff)
Fix order when searching notes
Diffstat (limited to 'app/src/main/java/it/niedermann/owncloud/notes/widget')
-rw-r--r--app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java
index 21965dd0..beb6f87d 100644
--- a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java
+++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java
@@ -10,7 +10,6 @@ import android.widget.RemoteViews;
import android.widget.RemoteViewsService;
import androidx.lifecycle.LiveData;
-import androidx.lifecycle.Observer;
import java.util.List;
@@ -55,17 +54,17 @@ public class NoteListWidgetFactory implements RemoteViewsService.RemoteViewsFact
Log.v(TAG, "--- data - " + data);
switch (data.getMode()) {
case MODE_DISPLAY_ALL:
- noteEntitiesLiveData = db.getNoteDao().searchRecent(data.getAccountId(), "%", CategorySortingMethod.SORT_MODIFIED_DESC.getSorder());
+ noteEntitiesLiveData = db.getNoteDao().searchRecentByModified(data.getAccountId(), "%");
break;
case MODE_DISPLAY_STARRED:
- noteEntitiesLiveData = db.getNoteDao().searchFavorites(data.getAccountId(), "%", CategorySortingMethod.SORT_MODIFIED_DESC.getSorder());
+ noteEntitiesLiveData = db.getNoteDao().searchFavoritesByModified(data.getAccountId(), "%");
break;
case MODE_DISPLAY_CATEGORY:
default:
if (data.getCategoryId() != null) {
- noteEntitiesLiveData = db.getNoteDao().searchByCategory(data.getAccountId(), "%", db.getCategoryDao().getCategoryTitleById(data.getCategoryId()), CategorySortingMethod.SORT_MODIFIED_DESC.getSorder());
+ noteEntitiesLiveData = db.getNoteDao().searchCategoryByModified(data.getAccountId(), "%", db.getCategoryDao().getCategoryTitleById(data.getCategoryId()));
} else {
- noteEntitiesLiveData = db.getNoteDao().searchUncategorized(data.getAccountId(), "%", CategorySortingMethod.SORT_MODIFIED_DESC.getSorder());
+ noteEntitiesLiveData = db.getNoteDao().searchUncategorizedByModified(data.getAccountId(), "%");
}
break;
}