Browse Source

fix bugs

master
PhilReact 12 months ago
parent
commit
6c17dd6bdb
  1. 3
      core/language/us.json
  2. 12
      core/src/components/friends-view/friends-feed.js
  3. 2
      plugins/plugins/core/messaging/q-chat/q-chat.src.js

3
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"
}
}

12
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()
<div style="width:100%;display: flex; justify-content:center">
<paper-spinner-lite active></paper-spinner-lite>
</div>
` : ''}
${this.hasFetched && !this.isLoading && this.feed.length === 0 ? html`
<div style="width:100%;display: flex; justify-content:center">
<p>${translate('friends.friends18')}</p>
</div>
` : ''}
${this.feedToRender.map((item) => {
return html`<feed-item

2
plugins/plugins/core/messaging/q-chat/q-chat.src.js

@ -532,6 +532,8 @@ class Chat extends LitElement {
open: true,
name: name
})
window.parent.reduxStore.dispatch(
window.parent.reduxAction.setSideEffectAction(null))
}
}

Loading…
Cancel
Save