Skip to content

Commit

Permalink
Fixed deprecations
Browse files Browse the repository at this point in the history
Signed-off-by: Arnau Mora Gras <[email protected]>
  • Loading branch information
ArnyminerZ committed Apr 10, 2024
1 parent 083aad9 commit 1467287
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/at/bitfire/icsdroid/Settings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Settings(context: Context) {

@Deprecated(
message = "Replace LiveData by Flows",
replaceWith = ReplaceWith("forceDarkModeFlow")
replaceWith = ReplaceWith("forceDarkModeFlow()")
)
fun forceDarkModeLive(): LiveData<Boolean> = object: LiveData<Boolean>() {
val listener = SharedPreferences.OnSharedPreferenceChangeListener { prefs, key ->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/at/bitfire/icsdroid/SyncWorker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class SyncWorker(

@Deprecated(
message = "Replace LiveData by Flows",
replaceWith = ReplaceWith("statusFlow")
replaceWith = ReplaceWith("statusFlow(context)")
)
fun liveStatus(context: Context) =
WorkManager.getInstance(context).getWorkInfosForUniqueWorkLiveData(NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface SubscriptionsDao {

@Deprecated(
message = "Replace LiveData by Flows",
replaceWith = ReplaceWith("getAllFlow")
replaceWith = ReplaceWith("getAllFlow()")
)
@Query("SELECT * FROM subscriptions")
fun getAllLive(): LiveData<List<Subscription>>
Expand All @@ -46,7 +46,7 @@ interface SubscriptionsDao {

@Deprecated(
message = "Replace LiveData by Flows",
replaceWith = ReplaceWith("getWithCredentialsByIdFlow")
replaceWith = ReplaceWith("getWithCredentialsByIdFlow(id)")
)
@Query("SELECT * FROM subscriptions WHERE id=:id")
fun getWithCredentialsByIdLive(id: Long): LiveData<SubscriptionWithCredential>
Expand All @@ -56,7 +56,7 @@ interface SubscriptionsDao {

@Deprecated(
message = "Replace LiveData by Flows",
replaceWith = ReplaceWith("getErrorMessageFlow")
replaceWith = ReplaceWith("getErrorMessageFlow(id)")
)
@Query("SELECT errorMessage FROM subscriptions WHERE id=:id")
fun getErrorMessageLive(id: Long): LiveData<String?>
Expand Down

0 comments on commit 1467287

Please sign in to comment.