From f6f3447f1df158233e7b778e3678826bfdab28fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Sat, 31 Jul 2021 18:08:35 +0200 Subject: [PATCH] Fix sorting notes in loading state (#1413) --- .gitignore | 1 + .../java/io/github/wulkanowy/ui/modules/note/NotePresenter.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3709487b..cd5ff714 100644 --- a/.gitignore +++ b/.gitignore @@ -118,3 +118,4 @@ Thumbs.db app/src/release/agconnect-services.json app/src/release/agconnect-credentials.json +.idea/deploymentTargetDropDown.xml diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/note/NotePresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/note/NotePresenter.kt index e80f5494..c441231e 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/note/NotePresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/note/NotePresenter.kt @@ -67,7 +67,7 @@ class NotePresenter @Inject constructor( showRefresh(true) showProgress(false) showContent(true) - updateData(it.data) + updateData(it.data.sortedByDescending { item -> item.date }) } } }