Updated on 2026-08-14
This commit is contained in:
parent
2c5c44736d
commit
e12bf31b93
3 changed files with 19 additions and 20 deletions
|
|
@ -1,16 +0,0 @@
|
|||
package com.tangem.util
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.navigation.NavController
|
||||
|
||||
fun NavController.navigateSafely(@IdRes destination: Int, data: Bundle? = null) {
|
||||
try {
|
||||
this.navigate(destination, data)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
Log.w(this::class.java.simpleName, e.message)
|
||||
} catch (e: IllegalStateException) {
|
||||
Log.w(this::class.java.simpleName, e.message)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue