Merge pull request #3996 from ByteHamster/removed-main-thread-db
Removed yet another DB access on the main thread
This commit is contained in:
commit
5cb984daa6
|
@ -15,7 +15,6 @@ import de.danoeh.antennapod.core.util.playback.PlaybackController;
|
||||||
import de.danoeh.antennapod.core.util.playback.Timeline;
|
import de.danoeh.antennapod.core.util.playback.Timeline;
|
||||||
import de.danoeh.antennapod.view.ShownotesWebView;
|
import de.danoeh.antennapod.view.ShownotesWebView;
|
||||||
import io.reactivex.Maybe;
|
import io.reactivex.Maybe;
|
||||||
import io.reactivex.Observable;
|
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
@ -87,12 +86,11 @@ public class ItemDescriptionFragment extends Fragment {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private String loadData() {
|
private String loadData() {
|
||||||
if (controller.getMedia() != null) {
|
if (controller.getMedia() == null) {
|
||||||
Timeline timeline = new Timeline(getActivity(), controller.getMedia());
|
|
||||||
return timeline.processShownotes();
|
|
||||||
} else {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Timeline timeline = new Timeline(getActivity(), controller.getMedia());
|
||||||
|
return timeline.processShownotes();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -143,9 +141,6 @@ public class ItemDescriptionFragment extends Fragment {
|
||||||
controller = new PlaybackController(getActivity()) {
|
controller = new PlaybackController(getActivity()) {
|
||||||
@Override
|
@Override
|
||||||
public boolean loadMediaInfo() {
|
public boolean loadMediaInfo() {
|
||||||
if (getMedia() == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
load();
|
load();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue