Code looking nicer

This commit is contained in:
Somethingweirdhere 2018-06-29 00:39:44 +02:00
parent f2f275512d
commit b9ea7ce066
2 changed files with 4 additions and 1 deletions

View File

@ -409,7 +409,9 @@ public class SubscriptionFragment extends BaseStateFragment<List<SubscriptionEnt
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.newThread())
.subscribe((@NonNull ChannelInfo result) -> {
List<SubscriptionEntity> toDelete = subscriptionService.subscriptionTable().getSubscription(result.getServiceId(), result.getUrl()).blockingFirst();
List<SubscriptionEntity> toDelete = subscriptionService.subscriptionTable()
.getSubscription(result.getServiceId(), result.getUrl())
.blockingFirst();
subscriptionService.subscriptionTable().delete(toDelete);
});
}

View File

@ -32,6 +32,7 @@ import org.schabi.newpipe.extractor.Info;
import org.schabi.newpipe.extractor.ListExtractor.InfoItemsPage;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;