Skip to content

Commit

Permalink
Add warning for long loading time
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza417 committed Aug 1, 2024
1 parent 16b8025 commit b353648
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/main/assets/html/changelogs.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ <h4>User Interface</h4>
<br>
<small>Can be toggled in <b>Development Preferences</b>.</small>
</li>
<li>Added suggestions for devices with really long loading time.</li>
</ul>

<h4>Bug Fixes</h4>
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/app/simple/inure/constants/Warnings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,9 @@ object Warnings {
* Root or shizuku required to change the state
*/
const val ROOT_OR_SHIZUKU_REQUIRED = "0x010: Root or Shizuku required to change the state"

/**
* If you're experiencing longer loading times, you can always disable startup loading from Preferences -> Behavior
*/
const val LONG_LOADING_TIME = "0x011: If you're experiencing longer loading times, you can always disable startup loading from Preferences -> Behavior"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import app.simple.inure.BuildConfig
import app.simple.inure.R
import app.simple.inure.apk.utils.PackageUtils.isPackageInstalled
import app.simple.inure.constants.BundleConstants
import app.simple.inure.constants.Warnings
import app.simple.inure.crash.CrashReport
import app.simple.inure.decorations.typeface.TypeFaceTextView
import app.simple.inure.decorations.views.LoaderImageView
Expand Down Expand Up @@ -192,6 +193,10 @@ class SplashScreen : ScopedFragment() {
}

private fun proceed() {
postDelayed(12_000) {
showWarning(Warnings.LONG_LOADING_TIME, goBack = false)
}

val appsViewModel = ViewModelProvider(requireActivity())[AppsViewModel::class.java]
val usageStatsData = ViewModelProvider(requireActivity())[UsageStatsViewModel::class.java]
val sensorsViewModel = ViewModelProvider(requireActivity())[SensorsViewModel::class.java]
Expand Down

0 comments on commit b353648

Please sign in to comment.