init settingsHelper before setting up CrashReporter

This commit is contained in:
Ammar Githam 2021-05-28 20:52:45 +09:00
parent c9f1e2eff4
commit 5b9354324e

View File

@ -17,17 +17,16 @@ import java.net.CookieHandler
import java.time.format.DateTimeFormatter import java.time.format.DateTimeFormatter
import java.util.* import java.util.*
@Suppress("unused") @Suppress("unused")
class InstaGrabberApplication : Application() { class InstaGrabberApplication : Application() {
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
CookieHandler.setDefault(NET_COOKIE_MANAGER) CookieHandler.setDefault(NET_COOKIE_MANAGER)
settingsHelper = SettingsHelper(this)
setupCrashReporter() setupCrashReporter()
setupCloseGuard() setupCloseGuard()
setupFresco() setupFresco()
Utils.cacheDir = cacheDir.absolutePath Utils.cacheDir = cacheDir.absolutePath
settingsHelper = SettingsHelper(this)
Utils.clipboardManager = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager Utils.clipboardManager = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
LocaleUtils.setLocale(baseContext) LocaleUtils.setLocale(baseContext)
val pattern = if (settingsHelper.getBoolean(CUSTOM_DATE_TIME_FORMAT_ENABLED)) { val pattern = if (settingsHelper.getBoolean(CUSTOM_DATE_TIME_FORMAT_ENABLED)) {