mirror of
https://github.com/chylex/Nextcloud-News.git
synced 2025-04-26 05:15:46 +02:00
try to fix out of syn issue
This commit is contained in:
parent
71f25d7e8a
commit
ddb0d5020f
@ -609,6 +609,10 @@ app.controller('NavigationController',
|
||||
return FeedResource.getUnreadCount();
|
||||
};
|
||||
|
||||
this.isUnread = function () {
|
||||
return this.getUnreadCount() > 0;
|
||||
};
|
||||
|
||||
this.getFeedUnreadCount = function (feedId) {
|
||||
var feed = FeedResource.getById(feedId);
|
||||
if (feed !== undefined) {
|
||||
@ -618,14 +622,26 @@ app.controller('NavigationController',
|
||||
}
|
||||
};
|
||||
|
||||
this.isFeedUnread = function (feedId) {
|
||||
return this.getFeedUnreadCount(feedId) > 0;
|
||||
};
|
||||
|
||||
this.getFolderUnreadCount= function (folderId) {
|
||||
return FeedResource.getFolderUnreadCount(folderId);
|
||||
};
|
||||
|
||||
this.isFolderUnread = function (folderId) {
|
||||
return this.getFolderUnreadCount(folderId) > 0;
|
||||
};
|
||||
|
||||
this.getStarredCount = function () {
|
||||
return ItemResource.getStarredCount();
|
||||
};
|
||||
|
||||
this.isStarredUnread = function () {
|
||||
return this.getStarredCount() > 0;
|
||||
};
|
||||
|
||||
this.toggleFolder = function (folderName) {
|
||||
FolderResource.toggleOpen(folderName);
|
||||
};
|
||||
|
4
js/build/app.min.js
vendored
4
js/build/app.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -63,6 +63,10 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource,
|
||||
return FeedResource.getUnreadCount();
|
||||
};
|
||||
|
||||
this.isUnread = function () {
|
||||
return this.getUnreadCount() > 0;
|
||||
};
|
||||
|
||||
this.getFeedUnreadCount = function (feedId) {
|
||||
var feed = FeedResource.getById(feedId);
|
||||
if (feed !== undefined) {
|
||||
@ -72,14 +76,26 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource,
|
||||
}
|
||||
};
|
||||
|
||||
this.isFeedUnread = function (feedId) {
|
||||
return this.getFeedUnreadCount(feedId) > 0;
|
||||
};
|
||||
|
||||
this.getFolderUnreadCount= function (folderId) {
|
||||
return FeedResource.getFolderUnreadCount(folderId);
|
||||
};
|
||||
|
||||
this.isFolderUnread = function (folderId) {
|
||||
return this.getFolderUnreadCount(folderId) > 0;
|
||||
};
|
||||
|
||||
this.getStarredCount = function () {
|
||||
return ItemResource.getStarredCount();
|
||||
};
|
||||
|
||||
this.isStarredUnread = function () {
|
||||
return this.getStarredCount() > 0;
|
||||
};
|
||||
|
||||
this.toggleFolder = function (folderName) {
|
||||
FolderResource.toggleOpen(folderName);
|
||||
};
|
||||
|
@ -1,10 +1,10 @@
|
||||
<li ng-class="{
|
||||
active: Navigation.isFeedActive(feed.id),
|
||||
unread: Navigation.getFeedUnreadCount(feed.id) > 0
|
||||
unread: Navigation.isFeedUnread(feed.id)
|
||||
}"
|
||||
ng-repeat="feed in Navigation.getFeedsOfFolder(<?php p($_['folderId']); ?>)
|
||||
| orderBy:'title.toLowerCase()' track by feed.url"
|
||||
ng-show="Navigation.getFeedUnreadCount(feed.id) > 0
|
||||
ng-show="Navigation.isFeedUnread(feed.id)
|
||||
|| Navigation.isShowAll()
|
||||
|| Navigation.isFeedActive(feed.id)
|
||||
|| !feed.id"
|
||||
@ -71,7 +71,7 @@
|
||||
ng-show="feed.id && !feed.editing && !feed.error && !feed.deleted">
|
||||
<ul>
|
||||
<li class="app-navigation-entry-utils-counter"
|
||||
ng-show="feed.id && Navigation.getFeedUnreadCount(feed.id) > 0"
|
||||
ng-show="feed.id && Navigation.isFeedUnread(feed.id)"
|
||||
title="{{ Navigation.getFeedUnreadCount(feed.id) }}">
|
||||
{{ Navigation.getFeedUnreadCount(feed.id) |
|
||||
unreadCountFormatter }}
|
||||
@ -113,7 +113,7 @@
|
||||
title="<?php p($l->t('Delete feed')); ?>">
|
||||
</button>
|
||||
</li>
|
||||
<li ng-show="Navigation.getFeedUnreadCount(feed.id) > 0" class="mark-read">
|
||||
<li ng-show="Navigation.isFeedUnread(feed.id)" class="mark-read">
|
||||
<button class="icon-checkmark"
|
||||
ng-click="Navigation.markFeedRead(feed.id)"
|
||||
title="<?php p($l->t('Mark all articles read')); ?>">
|
||||
|
@ -2,10 +2,10 @@
|
||||
active: Navigation.isFolderActive(folder.id),
|
||||
open: folder.opened || folder.getsFeed,
|
||||
collapsible: Navigation.hasFeeds(folder.id) || folder.getsFeed,
|
||||
unread: Navigation.getFolderUnreadCount(folder.id) > 0
|
||||
unread: Navigation.isFolderUnread(folder.id)
|
||||
}"
|
||||
ng-repeat="folder in Navigation.getFolders() | orderBy:'name.toLowerCase()'"
|
||||
ng-show="Navigation.getFolderUnreadCount(folder.id) > 0
|
||||
ng-show="Navigation.isFolderUnread(folder.id)
|
||||
|| Navigation.isShowAll()
|
||||
|| Navigation.isFolderActive(folder.id)
|
||||
|| Navigation.subFeedActive(folder.id)
|
||||
@ -96,7 +96,7 @@
|
||||
<ul>
|
||||
<li class="app-navigation-entry-utils-counter"
|
||||
ng-show="folder.id &&
|
||||
Navigation.getFolderUnreadCount(folder.id) > 0"
|
||||
Navigation.isFolderUnread(folder.id)"
|
||||
title="{{ Navigation.getFolderUnreadCount(folder.id) }}">
|
||||
{{ Navigation.getFolderUnreadCount(folder.id) |
|
||||
unreadCountFormatter }}
|
||||
@ -121,7 +121,7 @@
|
||||
title="<?php p($l->t('Delete folder')); ?>">
|
||||
</button>
|
||||
</li>
|
||||
<li ng-show="Navigation.getFolderUnreadCount(folder.id) > 0" class="mark-read">
|
||||
<li ng-show="Navigation.isFolderUnread(folder.id)" class="mark-read">
|
||||
<button class="icon-checkmark"
|
||||
ng-click="Navigation.markFolderRead(folder.id)"
|
||||
title="<?php p($l->t('Mark all articles read')); ?>">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<li ng-class="{
|
||||
active: Navigation.isStarredActive(),
|
||||
unread: Navigation.getStarredCount() > 0
|
||||
unread: Navigation.isStarredUnread()
|
||||
}"
|
||||
class="with-counter starred-feed">
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<div class="app-navigation-entry-utils">
|
||||
<ul>
|
||||
<li class="app-navigation-entry-utils-counter"
|
||||
ng-show="Navigation.getStarredCount() > 0"
|
||||
ng-show="Navigation.isStarredUnread()"
|
||||
title="{{ Navigation.getStarredCount() }}">
|
||||
{{ Navigation.getStarredCount() | unreadCountFormatter }}
|
||||
</li>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<li ng-class="{
|
||||
active: Navigation.isSubscriptionsActive(),
|
||||
unread: Navigation.getUnreadCount() > 0
|
||||
unread: Navigation.isUnread()
|
||||
}"
|
||||
class="subscriptions-feed with-counter with-menu">
|
||||
|
||||
@ -12,10 +12,10 @@
|
||||
<?php p($l->t('All articles'))?>
|
||||
</a>
|
||||
|
||||
<div class="app-navigation-entry-utils" ng-show="Navigation.getUnreadCount() > 0">
|
||||
<div class="app-navigation-entry-utils" ng-show="Navigation.isUnread()">
|
||||
<ul>
|
||||
<li class="app-navigation-entry-utils-counter"
|
||||
ng-show="Navigation.getUnreadCount() > 0"
|
||||
ng-show="Navigation.isUnread()"
|
||||
title="{{ Navigation.getUnreadCount() }}">
|
||||
{{ Navigation.getUnreadCount() | unreadCountFormatter }}
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user