From 54d29088091e37ab7ba84ae25c9003a136b9d33c Mon Sep 17 00:00:00 2001 From: SanmerDev Date: Sat, 29 Jun 2024 14:54:57 +0800 Subject: [PATCH] Remove unused code --- .../main/kotlin/dev/sanmer/mrepo/viewmodel/ModulesViewModel.kt | 2 -- .../kotlin/dev/sanmer/mrepo/viewmodel/RepositoryViewModel.kt | 2 -- 2 files changed, 4 deletions(-) diff --git a/app/src/main/kotlin/dev/sanmer/mrepo/viewmodel/ModulesViewModel.kt b/app/src/main/kotlin/dev/sanmer/mrepo/viewmodel/ModulesViewModel.kt index 5348d9b0..1188106d 100644 --- a/app/src/main/kotlin/dev/sanmer/mrepo/viewmodel/ModulesViewModel.kt +++ b/app/src/main/kotlin/dev/sanmer/mrepo/viewmodel/ModulesViewModel.kt @@ -136,14 +136,12 @@ class ModulesViewModel @Inject constructor( when (option) { Option.Name -> compareByDescending { it.name.lowercase() } Option.UpdatedTime -> compareBy { it.lastUpdated } - else -> compareByDescending { null } } } else { when (option) { Option.Name -> compareBy { it.name.lowercase() } Option.UpdatedTime -> compareByDescending { it.lastUpdated } - else -> compareByDescending { null } } } diff --git a/app/src/main/kotlin/dev/sanmer/mrepo/viewmodel/RepositoryViewModel.kt b/app/src/main/kotlin/dev/sanmer/mrepo/viewmodel/RepositoryViewModel.kt index 6de894ae..f928d273 100644 --- a/app/src/main/kotlin/dev/sanmer/mrepo/viewmodel/RepositoryViewModel.kt +++ b/app/src/main/kotlin/dev/sanmer/mrepo/viewmodel/RepositoryViewModel.kt @@ -111,14 +111,12 @@ class RepositoryViewModel @Inject constructor( when (option) { Option.Name -> compareByDescending { it.second.name.lowercase() } Option.UpdatedTime -> compareBy { it.first.lastUpdated } - else -> compareByDescending { null } } } else { when (option) { Option.Name -> compareBy { it.second.name.lowercase() } Option.UpdatedTime -> compareByDescending { it.first.lastUpdated } - else -> compareByDescending { null } } }