Remove delay, make nag message a bit stronger
This commit is contained in:
parent
0ecdac5fed
commit
3e6a3fe54e
|
@ -207,19 +207,13 @@ public class OnlineFeedViewFragment extends Fragment {
|
|||
.build();
|
||||
|
||||
download = Observable.fromCallable(() -> {
|
||||
long start = System.currentTimeMillis();
|
||||
feeds = DBReader.getFeedList();
|
||||
boolean isInDatabase = findFeedInSubscriptions() != null;
|
||||
if (isInDatabase) {
|
||||
if (findFeedInSubscriptions() != null) {
|
||||
viewBinding.stateDeleteNotSubscribedLabel.post(() ->
|
||||
viewBinding.stateDeleteNotSubscribedLabel.setVisibility(View.VISIBLE));
|
||||
}
|
||||
downloader = new HttpDownloader(request);
|
||||
downloader.call();
|
||||
long end = System.currentTimeMillis();
|
||||
if (isInDatabase && end < start + 4000) {
|
||||
Thread.sleep(4000 - (end - start)); // To nudge people into subscribing
|
||||
}
|
||||
return downloader.getResult();
|
||||
})
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
@ -309,7 +303,6 @@ public class OnlineFeedViewFragment extends Fragment {
|
|||
*/
|
||||
private void showFeedInformation(final Feed feed, Map<String, String> alternateFeedUrls) {
|
||||
viewBinding.progressBar.setVisibility(View.GONE);
|
||||
viewBinding.stateDeleteNotSubscribedLabel.setVisibility(View.GONE);
|
||||
viewBinding.feedDisplayContainer.setVisibility(View.VISIBLE);
|
||||
if (isFeedFoundBySearch) {
|
||||
int resId = R.string.no_feed_url_podcast_found_by_search;
|
||||
|
@ -363,6 +356,9 @@ public class OnlineFeedViewFragment extends Fragment {
|
|||
FeedDatabaseWriter.updateFeed(getContext(), feed, false);
|
||||
previewFeed(feedInSubscriptions.getId());
|
||||
});
|
||||
if (UserPreferences.isEnableAutodownload()) {
|
||||
viewBinding.autoDownloadCheckBox.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
viewBinding.openPodcastButton.setVisibility(View.GONE);
|
||||
|
|
|
@ -13,16 +13,6 @@
|
|||
android:layout_gravity="center"
|
||||
style="?android:attr/progressBarStyle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stateDeleteNotSubscribedLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:padding="32dp"
|
||||
android:textAlignment="center"
|
||||
android:visibility="gone"
|
||||
android:text="@string/state_deleted_not_subscribed" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/feed_display_container"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -153,6 +143,16 @@
|
|||
android:text="@string/preview_episodes"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stateDeleteNotSubscribedLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:text="@string/state_deleted_not_subscribed" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/autoDownloadCheckBox"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -683,7 +683,7 @@
|
|||
<string name="subscribe_label">Subscribe</string>
|
||||
<string name="preview_episodes">Preview episodes</string>
|
||||
<string name="subscribe_for_settings">Subscribe to change settings</string>
|
||||
<string name="state_deleted_not_subscribed">Playback state of non-subscribed podcasts is deleted after a while. Subscribe to the podcast to enjoy all features.</string>
|
||||
<string name="state_deleted_not_subscribed">Data like playback state of non-subscribed podcasts is deleted after a while. Subscribe to keep it.</string>
|
||||
|
||||
<!-- Content descriptions for image buttons -->
|
||||
<string name="toolbar_back_button_content_description">Back</string>
|
||||
|
|
Loading…
Reference in New Issue