Skip to content

Commit

Permalink
Show red error bubble only if more than 8 updates fail.
Browse files Browse the repository at this point in the history
This restores v24's behavior that hasn't been implemented in v25.

Signed-off-by: Andreas Mair <amair.sob@gmail.com>
  • Loading branch information
a-mair authored and wofferl committed Dec 9, 2024
1 parent 185ad7a commit f7ab264
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ You can also check [on GitHub](https://github.com/nextcloud/news/releases), the
# Unreleased
## [25.x.x]
### Changed
- Show red error bubble only if more than 8 updates fail.

### Fixed

Expand Down
12 changes: 6 additions & 6 deletions src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<span v-if="feed.faviconLink" style="width: 16px; height: 16px; background-size: contain;" :style="{ 'backgroundImage': 'url(' + feed.faviconLink + ')' }" />
</template>
<template #counter>
<NcCounterBubble v-show="feed.updateErrorCount > 0"
<NcCounterBubble v-show="feed.updateErrorCount > 8"
v-tooltip="feed.lastUpdateError"
type="highlighted"
style="background-color: red">
Expand All @@ -92,13 +92,13 @@
</NcAppNavigationItem>
</template>
<template #icon>
<FolderAlertIcon v-if="isFolder(topLevelItem) && topLevelItem.updateErrorCount > 0" v-tooltip="t('news', 'Has feeds with errors!')" style="width: 22px; color: red" />
<FolderIcon v-if="isFolder(topLevelItem) && topLevelItem.updateErrorCount === 0" style="width:22px" />
<FolderAlertIcon v-if="isFolder(topLevelItem) && topLevelItem.updateErrorCount > 8" v-tooltip="t('news', 'Has feeds with errors!')" style="width: 22px; color: red" />
<FolderIcon v-if="isFolder(topLevelItem) && topLevelItem.updateErrorCount <= 8" style="width:22px" />
<RssIcon v-if="!isFolder(topLevelItem) && !topLevelItem.faviconLink" />
<span v-if="!isFolder(topLevelItem) && topLevelItem.faviconLink" style="height: 16px; width: 16px; background-size: contain;" :style="{ 'backgroundImage': 'url(' + topLevelItem.faviconLink + ')' }" />
</template>
<template #counter>
<NcCounterBubble v-if="!isFolder(topLevelItem) && topLevelItem.updateErrorCount > 0"
<NcCounterBubble v-if="!isFolder(topLevelItem) && topLevelItem.updateErrorCount > 8"
v-tooltip="topLevelItem.lastUpdateError"
type="highlighted"
style="background-color: red">
Expand Down Expand Up @@ -629,9 +629,9 @@ export default Vue.extend({
return true
}
if (this.isFolder(item)) {
return item.feedCount > 0 || this.isActiveFolder(item) || this.hasActiveFeeds(item) || item.updateErrorCount > 0
return item.feedCount > 0 || this.isActiveFolder(item) || this.hasActiveFeeds(item) || item.updateErrorCount > 8
} else {
return item.unreadCount > 0 || item.updateErrorCount > 0 || this.isActiveFeed(item)
return item.unreadCount > 0 || item.updateErrorCount > 8 || this.isActiveFeed(item)
}
},
sortedFolderFeeds(item: Feed | Folder) {
Expand Down

0 comments on commit f7ab264

Please sign in to comment.