mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-06-18 05:23:12 +10:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d8e119eb4b | |||
| 1c65c5669a | |||
| 25852aaea1 | |||
| ee8b25330d | |||
| 0b039110c9 | |||
| 932f2a85dc | |||
| c89dd54fa6 | |||
| c81d2edba3 | |||
| d9de3207f5 | |||
| e7b69a8deb | |||
| c5962ad1a8 | |||
| 32561131b2 | |||
| 1ddd1d87be | |||
| df819b8782 | |||
| 196f930a1c | |||
| 8e2ab833a7 | |||
| d127ea23aa | |||
| 2773cc47e4 |
+5
-9
@@ -7,6 +7,7 @@ import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import androidx.core.app.ActivityCompat
|
||||
@@ -50,15 +51,15 @@ class UpdateCheckWorker(
|
||||
.maxByOrNull { it.first }
|
||||
?: return Result.success()
|
||||
|
||||
val (version, _) = latestVersion
|
||||
val (version, release) = latestVersion
|
||||
if (current >= version) return Result.success()
|
||||
|
||||
Log.i(BuildConfig.TAG, "Update available: $version (installed $current)")
|
||||
postUpdateNotification(version.toString())
|
||||
postUpdateNotification(version.toString(), release.htmlUrl)
|
||||
return Result.success()
|
||||
}
|
||||
|
||||
private fun postUpdateNotification(version: String) {
|
||||
private fun postUpdateNotification(version: String, releaseUrl: String) {
|
||||
val nm = applicationContext.getSystemService<NotificationManager>() ?: return
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
@@ -77,15 +78,10 @@ class UpdateCheckWorker(
|
||||
return
|
||||
}
|
||||
|
||||
val launchIntent = applicationContext.packageManager
|
||||
.getLaunchIntentForPackage(applicationContext.packageName)
|
||||
?.apply { addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) }
|
||||
?: return
|
||||
|
||||
val pendingIntent = PendingIntent.getActivity(
|
||||
applicationContext,
|
||||
0,
|
||||
launchIntent,
|
||||
Intent(Intent.ACTION_VIEW, Uri.parse(releaseUrl)).apply { addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) },
|
||||
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT,
|
||||
)
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
<string name="patch_lyrics_progress_pill_desc">Restores the old Track Progress Pill in the top of the Lyrics screen!</string>
|
||||
<string name="patch_lyrics_replace_button_title">Replace Lyrics Button</string>
|
||||
<string name="patch_lyrics_replace_button_desc">Replaces the Lyrics button with the RL Sparkle!</string>
|
||||
<string name="patch_lyrics_rl_api_title">Radiant Lyrics API - WIP</string>
|
||||
<string name="patch_lyrics_rl_api_title">Radiant Lyrics API</string>
|
||||
<string name="patch_lyrics_rl_api_desc">Use Radiant Lyrics API to fetch Lyrics (Higher quality & More providers)</string>
|
||||
<string name="patch_sticky_lyrics_title">Sticky Lyrics</string>
|
||||
<string name="patch_sticky_lyrics_desc">Always Forces the Lyrics page to be opened (aslong as the track has lyrics)</string>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"tidalVersionCode": 9090,
|
||||
"tidalApkUrl": "https://github.com/meowarex/rl-mobile/releases/download/latest/tidal-stock.apk",
|
||||
"patchesVersion": "0.9.7"
|
||||
"patchesVersion": "0.9.6"
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
|
||||
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
|
||||
const-string v0, "&platform=rl-mobile"
|
||||
const-string v0, "&platform=Radiant%20Lyrics"
|
||||
|
||||
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user