Refine RootSession.Transaction.iptables
This commit is contained in:
@@ -9,7 +9,6 @@ import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import androidx.lifecycle.OnLifecycleEvent
|
||||
import be.mygod.vpnhotspot.App.Companion.app
|
||||
import be.mygod.vpnhotspot.R
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.topjohnwu.superuser.NoShellException
|
||||
|
||||
@@ -21,7 +20,7 @@ sealed class SmartSnackbar {
|
||||
fun make(@StringRes text: Int): SmartSnackbar = make(app.getText(text))
|
||||
fun make(text: CharSequence? = ""): SmartSnackbar {
|
||||
val holder = holder
|
||||
return if (holder == null) {
|
||||
return if (holder == null) @SuppressLint("ShowToast") {
|
||||
if (Looper.myLooper() == null) Looper.prepare()
|
||||
ToastWrapper(Toast.makeText(app, text, Toast.LENGTH_LONG))
|
||||
} else SnackbarWrapper(Snackbar.make(holder, text ?: null.toString(), Snackbar.LENGTH_LONG))
|
||||
|
||||
Reference in New Issue
Block a user