From 301b21b8abbb969591c18edc7bc5b80dcd384156 Mon Sep 17 00:00:00 2001 From: lunaticbum <> Date: Thu, 19 Sep 2024 15:12:22 +0900 Subject: [PATCH] ... --- .../rasel/lunar/launcher/LauncherActivity.kt | 1 + .../rasel/lunar/launcher/home/LauncherHome.kt | 2 +- app/src/main/res/layout/launcher_home.xml | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/rasel/lunar/launcher/LauncherActivity.kt b/app/src/main/kotlin/rasel/lunar/launcher/LauncherActivity.kt index 351b547e..b48b6c05 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/LauncherActivity.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/LauncherActivity.kt @@ -295,6 +295,7 @@ internal class LauncherActivity : AppCompatActivity() { }, delay, TimeUnit.SECONDS) Executors.newSingleThreadScheduledExecutor().schedule({ + //de574a260b1f474d99955729241909 mWorkManager?.cancelAllWorkByTag(OpenWeatherGetter.TAG) mWorkManager?.enqueueUniquePeriodicWork( OpenWeatherGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE, diff --git a/app/src/main/kotlin/rasel/lunar/launcher/home/LauncherHome.kt b/app/src/main/kotlin/rasel/lunar/launcher/home/LauncherHome.kt index f43b635c..faf13e26 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/home/LauncherHome.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/home/LauncherHome.kt @@ -312,7 +312,7 @@ internal class LauncherHome : Fragment() { e.printStackTrace() } - mNotificationResult = WorkersDb.getRealm().query().sort("postTime",Sort.DESCENDING).find() + mNotificationResult = WorkersDb.getRealm().query().sort("postTime",Sort.DESCENDING).distinct("pkgName").find() noticeJob = CoroutineScope(Dispatchers.Default).launch { mNotificationResult?.asFlow()?.collect { changes: ResultsChange -> // BLog.LOGE("changes >>> ${changes}") diff --git a/app/src/main/res/layout/launcher_home.xml b/app/src/main/res/layout/launcher_home.xml index 1650d368..b27a45c2 100644 --- a/app/src/main/res/layout/launcher_home.xml +++ b/app/src/main/res/layout/launcher_home.xml @@ -77,7 +77,7 @@ app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toBottomOf="@+id/time" - /> + /> + + +