New update removes access to the backQueue

This commit is contained in:
Vitor Pamplona
2023-06-13 16:29:21 -04:00
parent 858f94ae74
commit 305ecc6a2e
@@ -24,6 +24,7 @@ import com.vitorpamplona.amethyst.model.LocalCache
import com.vitorpamplona.amethyst.model.Note import com.vitorpamplona.amethyst.model.Note
import com.vitorpamplona.amethyst.service.model.ChannelCreateEvent import com.vitorpamplona.amethyst.service.model.ChannelCreateEvent
import com.vitorpamplona.amethyst.service.model.PrivateDmEvent import com.vitorpamplona.amethyst.service.model.PrivateDmEvent
import com.vitorpamplona.amethyst.ui.navigation.Route
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@@ -35,8 +36,11 @@ fun LoadRedirectScreen(eventId: String?, navController: NavController) {
val nav = remember(navController) { val nav = remember(navController) {
{ route: String -> { route: String ->
navController.backQueue.removeLast() navController.navigate(route) {
navController.navigate(route) popUpTo(Route.Event.route) {
inclusive = true
}
}
} }
} }