Move player notification settings into appearance section
This commit is contained in:
parent
da9bd1d420
commit
e0c674bc9e
7 changed files with 23 additions and 19 deletions
|
|
@ -71,12 +71,12 @@ class SubscriptionManager(context: Context) {
|
|||
|
||||
fun updateNotificationMode(serviceId: Int, url: String?, @NotificationMode mode: Int): Completable {
|
||||
return subscriptionTable().getSubscription(serviceId, url!!)
|
||||
.flatMapCompletable { entity: SubscriptionEntity ->
|
||||
Completable.fromAction {
|
||||
entity.notificationMode = mode
|
||||
subscriptionTable().update(entity)
|
||||
}.andThen(rememberLastStream(entity))
|
||||
}
|
||||
.flatMapCompletable { entity: SubscriptionEntity ->
|
||||
Completable.fromAction {
|
||||
entity.notificationMode = mode
|
||||
subscriptionTable().update(entity)
|
||||
}.andThen(rememberLastStream(entity))
|
||||
}
|
||||
}
|
||||
|
||||
fun updateFromInfo(subscriptionId: Long, info: ListInfo<StreamInfoItem>) {
|
||||
|
|
@ -110,11 +110,11 @@ class SubscriptionManager(context: Context) {
|
|||
|
||||
private fun rememberLastStream(subscription: SubscriptionEntity): Completable {
|
||||
return ExtractorHelper.getChannelInfo(subscription.serviceId, subscription.url, false)
|
||||
.map { channel -> channel.relatedItems.map { stream -> StreamEntity(stream) } }
|
||||
.flatMapCompletable { entities ->
|
||||
Completable.fromAction {
|
||||
database.streamDAO().upsertAll(entities)
|
||||
}
|
||||
}.onErrorComplete()
|
||||
.map { channel -> channel.relatedItems.map { stream -> StreamEntity(stream) } }
|
||||
.flatMapCompletable { entities ->
|
||||
Completable.fromAction {
|
||||
database.streamDAO().upsertAll(entities)
|
||||
}
|
||||
}.onErrorComplete()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class AppearanceSettingsFragment extends BasePreferenceFragment {
|
|||
|
||||
@Override
|
||||
public boolean onPreferenceTreeClick(final Preference preference) {
|
||||
if (preference.getKey().equals(captionSettingsKey) && CAPTIONING_SETTINGS_ACCESSIBLE) {
|
||||
if (captionSettingsKey.equals(preference.getKey()) && CAPTIONING_SETTINGS_ACCESSIBLE) {
|
||||
try {
|
||||
startActivity(new Intent(Settings.ACTION_CAPTIONING_SETTINGS));
|
||||
} catch (final ActivityNotFoundException e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue