mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-20 03:24:50 +00:00
Added background subscription upadte failed toast and removed home page refresh when older than a minute.
This commit is contained in:
parent
de5a4aa5f3
commit
44a6e5da38
2 changed files with 3 additions and 3 deletions
|
@ -141,10 +141,9 @@ class HomeFragment : MainFragment() {
|
|||
|
||||
val feedstyleChanged = recyclerData.loadedFeedStyle != feedStyle;
|
||||
val clientsChanged = lastClients == null || lastClients.size != clients.size || !lastClients.containsAll(clients);
|
||||
val outdated = recyclerData.lastLoad.getNowDiffSeconds() > 60;
|
||||
Logger.i(TAG, "onShown (recyclerData.loadedFeedStyle=${recyclerData.loadedFeedStyle}, recyclerData.lastLoad=${recyclerData.lastLoad}, feedstyleChanged=$feedstyleChanged, clientsChanged=$clientsChanged, outdated=$outdated)")
|
||||
Logger.i(TAG, "onShown (recyclerData.loadedFeedStyle=${recyclerData.loadedFeedStyle}, recyclerData.lastLoad=${recyclerData.lastLoad}, feedstyleChanged=$feedstyleChanged, clientsChanged=$clientsChanged)")
|
||||
|
||||
if(feedstyleChanged || outdated || clientsChanged) {
|
||||
if(feedstyleChanged || clientsChanged) {
|
||||
recyclerData.lastLoad = OffsetDateTime.now();
|
||||
recyclerData.loadedFeedStyle = feedStyle;
|
||||
recyclerData.lastClients = clients;
|
||||
|
|
|
@ -645,6 +645,7 @@ class StateApp {
|
|||
wm.cancelAllWork();
|
||||
} catch (e: Throwable) {
|
||||
Logger.e(TAG, "Failed to schedule background subscription updates.", e)
|
||||
UIDialogs.toast(context, "Background subscription update failed: " + e.message)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue