mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-11-22 09:04:32 +01:00
Fix Toasts from Background Thread
This commit is contained in:
parent
9add1dd88c
commit
c4adc1a0db
@ -243,12 +243,14 @@ class MainActivity : ComponentActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun showPopUpMessage(string: String, long: Boolean = false) {
|
private fun showPopUpMessage(string: String, long: Boolean = false) {
|
||||||
|
runOnUiThread {
|
||||||
android.widget.Toast.makeText(
|
android.widget.Toast.makeText(
|
||||||
applicationContext,
|
applicationContext,
|
||||||
string,
|
string,
|
||||||
if (long) android.widget.Toast.LENGTH_LONG else android.widget.Toast.LENGTH_SHORT
|
if (long) android.widget.Toast.LENGTH_LONG else android.widget.Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
override fun onRequestPermissionsResult(
|
override fun onRequestPermissionsResult(
|
||||||
|
@ -25,7 +25,7 @@ internal class DesktopAnalyticsManager(
|
|||||||
loggingLevel = LoggingLevel.ERROR
|
loggingLevel = LoggingLevel.ERROR
|
||||||
setDeviceIdStrategy(DeviceIdStrategy.UUID)
|
setDeviceIdStrategy(DeviceIdStrategy.UUID)
|
||||||
enableFeatures(*featuresSet)
|
enableFeatures(*featuresSet)
|
||||||
setRequiresConsent(true)
|
setRequiresConsent(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
Countly.init(File(fileManager.defaultDir()), config)
|
Countly.init(File(fileManager.defaultDir()), config)
|
||||||
|
Loading…
Reference in New Issue
Block a user