diff --git a/core/language/us.json b/core/language/us.json index 18631964..b61e21aa 100644 --- a/core/language/us.json +++ b/core/language/us.json @@ -1194,6 +1194,7 @@ "friend14": "Remove friend", "friend15": "Feed settings", "friend16": "Select the Q-Apps you want updates from, especially those related to your friends.", - "friends17": "Friends" + "friends17": "Friends", + "friends18": "No items in your feed" } } \ No newline at end of file diff --git a/core/src/components/friends-view/friends-feed.js b/core/src/components/friends-view/friends-feed.js index 4f412d6f..268552ee 100644 --- a/core/src/components/friends-view/friends-feed.js +++ b/core/src/components/friends-view/friends-feed.js @@ -5,6 +5,8 @@ import { friendsViewStyles } from './friends-view-css'; import { connect } from 'pwa-helpers'; import { store } from '../../store'; import './feed-item' +import { translate } from 'lit-translate'; + import '@polymer/paper-spinner/paper-spinner-lite.js' @@ -16,7 +18,8 @@ class FriendsFeed extends connect(store)(LitElement) { return { feed: {type: Array}, setHasNewFeed: {attribute:false}, - isLoading: {type: Boolean} + isLoading: {type: Boolean}, + hasFetched: {type: Boolean} }; } constructor(){ @@ -34,6 +37,7 @@ class FriendsFeed extends connect(store)(LitElement) { this.elementObserver = this.elementObserver.bind(this) this.mySelectedFeeds = [] this.getSchemas = this.getSchemas.bind(this) + this.hasFetched = false } @@ -257,6 +261,7 @@ this.getFeedOnInterval() } } this.isLoading = false + this.hasFetched = true; // Trim the results if somehow they are over the totalDesiredCount return results.slice(0, totalDesiredCount); } @@ -370,6 +375,11 @@ this.getFeedOnInterval()
+ ` : ''} + ${this.hasFetched && !this.isLoading && this.feed.length === 0 ? html` +
+

${translate('friends.friends18')}

+
` : ''} ${this.feedToRender.map((item) => { return html`