Compare commits

...

3 Commits

Author SHA1 Message Date
Caleb Eggensperger
944e0690ba
Add 10 minute option to "smart mark as played" (#7941) 2025-08-27 21:36:19 +02:00
Hans-Peter Lehmann
b0f52e01f7
Fix stale issue action (#7949)
Partially reverts 5e1ec5fc2e823102b5be7181d4fb9293551f9de4.
This prevented closing issues/PRs by removing the stale label again.
2025-08-27 18:17:41 +02:00
Hans-Peter Lehmann
5eccb2e64e
Add message: Please wait some time before refreshing again (#7950) 2025-08-27 18:17:25 +02:00
4 changed files with 11 additions and 1 deletions

View File

@ -20,7 +20,7 @@ jobs:
stale-pr-label: 'Needs: Reply still'
stale-issue-message: "This issue will be closed when we don't get a reply within 7 days."
stale-pr-message: "This PR will be closed when we don't get a reply within 7 days."
labels-to-remove-when-stale: 'Needs: Reply'
labels-to-remove-when-unstale: 'Needs: Reply,Needs: Reply still'
close-issue-label: "Close reason: No reply"
close-pr-label: "Close reason: No reply"
close-issue-message: "This issue was closed because we didn't get a reply for 14 days."

View File

@ -34,6 +34,8 @@ public class FeedUpdateManagerImpl extends FeedUpdateManager {
public static final String EXTRA_EVEN_ON_MOBILE = "even_on_mobile";
public static final String EXTRA_MANUAL = "manual";
private static final String TAG = "AutoUpdateManager";
private static long lastManualRefreshTime = 0;
private static final long REFRESH_COOLDOWN_MS = 20_000;
/**
* Start / restart periodic auto feed refresh
@ -64,6 +66,7 @@ public class FeedUpdateManagerImpl extends FeedUpdateManager {
}
public void runOnce(Context context, Feed feed, boolean nextPage) {
lastManualRefreshTime = System.currentTimeMillis();
OneTimeWorkRequest.Builder workRequest = new OneTimeWorkRequest.Builder(FeedUpdateWorker.class)
.setInitialDelay(0L, TimeUnit.MILLISECONDS)
.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST)
@ -89,6 +92,11 @@ public class FeedUpdateManagerImpl extends FeedUpdateManager {
}
public void runOnceOrAsk(@NonNull Context context, @Nullable Feed feed) {
if (System.currentTimeMillis() - lastManualRefreshTime < REFRESH_COOLDOWN_MS) {
EventBus.getDefault().post(new MessageEvent(context.getString(R.string.please_wait_before_refreshing)));
EventBus.getDefault().postSticky(new FeedUpdateRunningEvent(false));
return;
}
Log.d(TAG, "Run auto update immediately in background.");
if (feed != null && feed.isLocalFeed()) {
runOnce(context, feed);

View File

@ -211,6 +211,7 @@
<string name="multi_select_started_talkback">Multi select actions shown at the bottom</string>
<string name="filtered_label">Filtered</string>
<string name="refresh_failed_msg">Last refresh failed. Tap to view details.</string>
<string name="please_wait_before_refreshing">Please wait some time before refreshing podcasts again.</string>
<string name="open_podcast">Open podcast</string>
<string name="please_wait_for_data">Please wait until the data is loaded</string>
<string name="updates_disabled_label">Updates disabled</string>

View File

@ -101,6 +101,7 @@
<item>60</item>
<item>120</item>
<item>300</item>
<item>600</item>
</string-array>