diff --git a/app/src/main/java/com/pixelized/biblib/ui/screen/home/detail/BookDetailViewModel.kt b/app/src/main/java/com/pixelized/biblib/ui/screen/home/detail/BookDetailViewModel.kt
index 0cbd933..9b9beef 100644
--- a/app/src/main/java/com/pixelized/biblib/ui/screen/home/detail/BookDetailViewModel.kt
+++ b/app/src/main/java/com/pixelized/biblib/ui/screen/home/detail/BookDetailViewModel.kt
@@ -56,7 +56,6 @@ class BookDetailViewModel @Inject constructor(
Log.d("send", data.toString())
} catch (exception: Exception) {
Log.d("send", exception.message, exception)
- _sendStatus.emit(false)
_error.emit(toSendBookUio(bookId = bookId, mail = email, format))
}
}
diff --git a/app/src/main/java/com/pixelized/biblib/ui/screen/home/detail/DetailScreen.kt b/app/src/main/java/com/pixelized/biblib/ui/screen/home/detail/DetailScreen.kt
index db048b8..cdddaa2 100644
--- a/app/src/main/java/com/pixelized/biblib/ui/screen/home/detail/DetailScreen.kt
+++ b/app/src/main/java/com/pixelized/biblib/ui/screen/home/detail/DetailScreen.kt
@@ -21,7 +21,6 @@ import com.pixelized.biblib.ui.theme.color.ShadowPalette
import com.pixelized.biblib.utils.extention.bibLib
import com.pixelized.biblib.utils.extention.showToast
import kotlinx.coroutines.launch
-import java.io.Serializable
@Stable
@Immutable
@@ -124,7 +123,7 @@ fun DetailScreen(
}
if (detailState.bottomSheetState.isVisible || detailState.bottomSheetState.isAnimationRunning) {
- LaunchedEffect(key1 = "DetailScreenError") {
+ LaunchedEffect(key1 = "DetailScreenError$bookId") {
detailViewModel.error.collect {
val result = snackBarHost.showSnackbar(
message = context.getString(it.message),
@@ -145,14 +144,17 @@ fun DetailScreen(
}
}
- LaunchedEffect(key1 = "") {
+ LaunchedEffect(key1 = "DetailScreenSuccess:$bookId") {
detailViewModel.sendStatus.collect {
-
+ snackBarHost.showSnackbar(
+ message = context.getString(R.string.detail_send_success)
+ )
}
}
LaunchedEffect(key1 = bookId) {
bookId?.let { detailViewModel.getDetail(it) }
+ emailSheetState.hide()
}
BackHandler(emailSheetState.isVisible || emailSheetState.isAnimationRunning) {
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 81a2fd7..b524672 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -47,7 +47,10 @@
Publication
Genre
Séries
- Envoyer cet eBook à :
+
+ Envoyer cet eBook à :
+ Format de l\'eBook :
+ Envoyer
Envoyer sur votre Kindle
Assurez-vous que votre Kindle dispose d\'une connexion Internet, que %1$s est un expéditeur approuvé et que l\'adresse e-mail suivante est correctement configurée sur votre compte Amazon.
@@ -55,6 +58,7 @@
https://www.amazon.fr/gp/help/customer/display.html?nodeId=G7NECT4B4ZWHQ8WV
Oui
Annuler
+ eBook envoyé avec succès
Rechercher sur Biblib
Rechercher
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 721344f..08f1889 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -9,9 +9,9 @@
Register
Login
Sign in with
- EPUB
- MOBI
- SEND
+ EPUB
+ MOBI
+ SEND
@@ -61,8 +61,8 @@
Series
Send this eBook to:
- Use this format:
- Confirm
+ eBook format:
+ Send
Send to your Kindle
Make sure your Kindle has an internet connection, that %1$s is an approved expeditor and that the following email address is correctly set up on your Amazon Account.
@@ -70,6 +70,7 @@
https://www.amazon.co.uk/gp/help/customer/display.html?nodeId=G7NECT4B4ZWHQ8WV
Yes
Cancel
+ eBook sent with success
Search on Biblib
Search