Skip to content
This repository was archived by the owner on Dec 28, 2022. It is now read-only.

Commit c1080f2

Browse files
committed
Merge branch 'master' into dev
# Conflicts: # .idea/codeStyles/Project.xml # app/src/main/assets/web/info.html # app/src/main/assets/web/info_dark.html # app/src/main/java/com/simplecity/amp_library/model/Playlist.java # app/src/main/java/com/simplecity/amp_library/notifications/MusicNotificationHelper.java # app/src/main/java/com/simplecity/amp_library/ui/dialog/ChangelogDialog.java # buildSrc/src/main/kotlin/Config.kt
2 parents 11a472e + b9db011 commit c1080f2

File tree

7 files changed

+106
-37
lines changed

7 files changed

+106
-37
lines changed

.idea/codeStyles/Project.xml

+64-34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/assets/web/info.html

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
</head>
99

1010
<body>
11+
<h4>2.0.13-beta1</h4>
12+
<ul>
13+
<li>Continues where 2.0.12-beta6 left off</li>
14+
</ul>
15+
<h4>2.0.12</h4>
16+
<ul>
17+
<li>Fixed an issue preventing playlists from showing up</li>
18+
<li>Crash fixes</li>
19+
<li>I've been rebuilding Shuttle from scratch for almost a year now! DM me your Play Store email address on Discord <a href="https://discord.gg/4Z5EU7K">Discord</a> if you're interested in testing the alpha :D</li>
20+
</ul>
1121
<h4>2.0.12-beta6</h4>
1222
<ul>
1323
<li>Fixed an issue where artwork didn't load on some devices</li>

app/src/main/assets/web/info_dark.html

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
</head>
99

1010
<body>
11+
<h4>2.0.13-beta1</h4>
12+
<ul>
13+
<li>Continues where 2.0.12-beta6 left off</li>
14+
</ul>
15+
<h4>2.0.12</h4>
16+
<ul>
17+
<li>Fixed an issue preventing playlists from showing up</li>
18+
<li>Crash fixes</li>
19+
<li>I've been rebuilding Shuttle from scratch for almost a year now! DM me your Play Store email address on Discord <a href="https://discord.gg/4Z5EU7K">Discord</a> if you're interested in testing the alpha :D</li>
20+
</ul>
1121
<h4>2.0.12-beta6</h4>
1222
<ul>
1323
<li>Fixed an issue where artwork didn't load on some devices</li>

app/src/main/java/com/simplecity/amp_library/notifications/MusicNotificationHelper.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.simplecity.amp_library.utils.SettingsManager;
3434
import com.simplecity.amp_library.utils.playlists.FavoritesPlaylistManager;
3535
import io.reactivex.android.schedulers.AndroidSchedulers;
36+
import io.reactivex.disposables.CompositeDisposable;
3637
import io.reactivex.schedulers.Schedulers;
3738
import java.util.ConcurrentModificationException;
3839

@@ -52,6 +53,8 @@ public class MusicNotificationHelper extends NotificationHelper {
5253

5354
private AnalyticsManager analyticsManager;
5455

56+
private CompositeDisposable compositeDisposable = new CompositeDisposable();
57+
5558
public MusicNotificationHelper(Context context, AnalyticsManager analyticsManager) {
5659
super(context);
5760

@@ -119,7 +122,7 @@ public void notify(
119122
notification = getBuilder(context, song, mediaSessionToken, bitmap, isPlaying, isFavorite).build();
120123
notify(NOTIFICATION_ID, notification);
121124

122-
favoritesPlaylistManager.isFavorite(song)
125+
compositeDisposable.add(favoritesPlaylistManager.isFavorite(song)
123126
.first(false)
124127
.subscribeOn(Schedulers.io())
125128
.observeOn(AndroidSchedulers.mainThread())
@@ -129,7 +132,7 @@ public void notify(
129132
notify(notification);
130133
}, error -> {
131134
LogUtils.logException(TAG, "MusicNotificationHelper failed to present notification", error);
132-
});
135+
}));
133136

134137
handler.post(() -> Glide.with(context)
135138
.load(song)
@@ -194,4 +197,8 @@ public void notify(Notification notification) {
194197
public void cancel() {
195198
super.cancel(NOTIFICATION_ID);
196199
}
200+
201+
public void tearDown() {
202+
compositeDisposable.clear();
203+
}
197204
}

app/src/main/java/com/simplecity/amp_library/playback/MusicService.java

+1
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ public void onDestroy() {
336336
playbackManager.destroy();
337337

338338
dummyNotificationHelper.teardown(this);
339+
notificationHelper.tearDown();
339340

340341
disposables.clear();
341342

app/src/main/java/com/simplecity/amp_library/ui/dialog/ChangelogDialog.kt

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package com.simplecity.amp_library.ui.dialog
33
import android.annotation.SuppressLint
44
import android.app.Dialog
55
import android.content.Context
6+
import android.content.Intent
7+
import android.net.Uri
68
import android.os.Bundle
79
import android.support.v4.app.DialogFragment
810
import android.support.v4.app.FragmentManager
@@ -48,6 +50,15 @@ class ChangelogDialog : DialogFragment() {
4850

4951
ViewUtils.fadeOut(progressBar) { ViewUtils.fadeIn(webView, null) }
5052
}
53+
54+
override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
55+
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
56+
if (intent.resolveActivity(context!!.packageManager) != null) {
57+
context?.startActivity(intent)
58+
return true
59+
}
60+
return false
61+
}
5162
}
5263

5364
Aesthetic.get(context)

buildSrc/src/main/kotlin/Config.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
object Config {
22

3-
const val versionName = "2.0.12-beta6"
3+
const val versionName = "2.0.13-beta1"
44

55
}

0 commit comments

Comments
 (0)