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

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
timusus committed Oct 30, 2019
2 parents 11a472e + b9db011 commit c1080f2
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 37 deletions.
98 changes: 64 additions & 34 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions app/src/main/assets/web/info.html
Expand Up @@ -8,6 +8,16 @@
</head>

<body>
<h4>2.0.13-beta1</h4>
<ul>
<li>Continues where 2.0.12-beta6 left off</li>
</ul>
<h4>2.0.12</h4>
<ul>
<li>Fixed an issue preventing playlists from showing up</li>
<li>Crash fixes</li>
<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>
</ul>
<h4>2.0.12-beta6</h4>
<ul>
<li>Fixed an issue where artwork didn't load on some devices</li>
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/assets/web/info_dark.html
Expand Up @@ -8,6 +8,16 @@
</head>

<body>
<h4>2.0.13-beta1</h4>
<ul>
<li>Continues where 2.0.12-beta6 left off</li>
</ul>
<h4>2.0.12</h4>
<ul>
<li>Fixed an issue preventing playlists from showing up</li>
<li>Crash fixes</li>
<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>
</ul>
<h4>2.0.12-beta6</h4>
<ul>
<li>Fixed an issue where artwork didn't load on some devices</li>
Expand Down
Expand Up @@ -33,6 +33,7 @@
import com.simplecity.amp_library.utils.SettingsManager;
import com.simplecity.amp_library.utils.playlists.FavoritesPlaylistManager;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.schedulers.Schedulers;
import java.util.ConcurrentModificationException;

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

private AnalyticsManager analyticsManager;

private CompositeDisposable compositeDisposable = new CompositeDisposable();

public MusicNotificationHelper(Context context, AnalyticsManager analyticsManager) {
super(context);

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

favoritesPlaylistManager.isFavorite(song)
compositeDisposable.add(favoritesPlaylistManager.isFavorite(song)
.first(false)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
Expand All @@ -129,7 +132,7 @@ public void notify(
notify(notification);
}, error -> {
LogUtils.logException(TAG, "MusicNotificationHelper failed to present notification", error);
});
}));

handler.post(() -> Glide.with(context)
.load(song)
Expand Down Expand Up @@ -194,4 +197,8 @@ public void notify(Notification notification) {
public void cancel() {
super.cancel(NOTIFICATION_ID);
}

public void tearDown() {
compositeDisposable.clear();
}
}
Expand Up @@ -336,6 +336,7 @@ public void onDestroy() {
playbackManager.destroy();

dummyNotificationHelper.teardown(this);
notificationHelper.tearDown();

disposables.clear();

Expand Down
Expand Up @@ -3,6 +3,8 @@ package com.simplecity.amp_library.ui.dialog
import android.annotation.SuppressLint
import android.app.Dialog
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.support.v4.app.DialogFragment
import android.support.v4.app.FragmentManager
Expand Down Expand Up @@ -48,6 +50,15 @@ class ChangelogDialog : DialogFragment() {

ViewUtils.fadeOut(progressBar) { ViewUtils.fadeIn(webView, null) }
}

override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
if (intent.resolveActivity(context!!.packageManager) != null) {
context?.startActivity(intent)
return true
}
return false
}
}

Aesthetic.get(context)
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Config.kt
@@ -1,5 +1,5 @@
object Config {

const val versionName = "2.0.12-beta6"
const val versionName = "2.0.13-beta1"

}

0 comments on commit c1080f2

Please sign in to comment.