feat: hide crash dialogs when developing

Hides the crash dialogs when the application is being developed,
as it is obvious and the crash log is easily available
This commit is contained in:
FineFindus 2024-11-11 20:35:59 +01:00 committed by Bnyro
parent de975986ce
commit 79039f727a

View File

@ -29,6 +29,7 @@ import androidx.navigation.findNavController
import androidx.navigation.fragment.NavHostFragment import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupWithNavController import androidx.navigation.ui.setupWithNavController
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.github.libretube.BuildConfig
import com.github.libretube.NavDirections import com.github.libretube.NavDirections
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.compat.PictureInPictureCompat import com.github.libretube.compat.PictureInPictureCompat
@ -153,6 +154,7 @@ class MainActivity : BaseActivity() {
// handle error logs // handle error logs
PreferenceHelper.getErrorLog().ifBlank { null }?.let { PreferenceHelper.getErrorLog().ifBlank { null }?.let {
if (!BuildConfig.DEBUG)
ErrorDialog().show(supportFragmentManager, null) ErrorDialog().show(supportFragmentManager, null)
} }