mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 06:21:48 +01:00
fix to multiple "add to library" toasts bug when adding a new series (#9433)
fix to multiple "add to library" toasts bug (#9177) Co-authored-by: Houssein Zaghdane <zaghdane@fireflow.de>
This commit is contained in:
parent
f63573f25f
commit
6ce42dc167
@ -605,6 +605,9 @@ class MangaInfoScreenModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isFavorited && !successState.hasPromptedToAddBefore) {
|
if (!isFavorited && !successState.hasPromptedToAddBefore) {
|
||||||
|
updateSuccessState { successState ->
|
||||||
|
successState.copy(hasPromptedToAddBefore = true)
|
||||||
|
}
|
||||||
coroutineScope.launch {
|
coroutineScope.launch {
|
||||||
val result = snackbarHostState.showSnackbar(
|
val result = snackbarHostState.showSnackbar(
|
||||||
message = context.getString(R.string.snack_add_to_library),
|
message = context.getString(R.string.snack_add_to_library),
|
||||||
@ -614,9 +617,6 @@ class MangaInfoScreenModel(
|
|||||||
if (result == SnackbarResult.ActionPerformed && !isFavorited) {
|
if (result == SnackbarResult.ActionPerformed && !isFavorited) {
|
||||||
toggleFavorite()
|
toggleFavorite()
|
||||||
}
|
}
|
||||||
updateSuccessState { successState ->
|
|
||||||
successState.copy(hasPromptedToAddBefore = true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user