summaryrefslogtreecommitdiff
path: root/src/client/app/mobile/views
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-19 14:34:51 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-19 14:34:51 +0900
commite8de29ae79f8b4157f6522ed895b2415fa3c877a (patch)
tree4ebd66797682bc64f53aa48db767cf4a34230bda /src/client/app/mobile/views
parent10.24.0 (diff)
downloadmisskey-e8de29ae79f8b4157f6522ed895b2415fa3c877a.tar.gz
misskey-e8de29ae79f8b4157f6522ed895b2415fa3c877a.tar.bz2
misskey-e8de29ae79f8b4157f6522ed895b2415fa3c877a.zip
Resolve #2935
Diffstat (limited to 'src/client/app/mobile/views')
-rw-r--r--src/client/app/mobile/views/components/notes.vue23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/client/app/mobile/views/components/notes.vue b/src/client/app/mobile/views/components/notes.vue
index 055b731f3c..53ffe49c5b 100644
--- a/src/client/app/mobile/views/components/notes.vue
+++ b/src/client/app/mobile/views/components/notes.vue
@@ -37,7 +37,6 @@
<script lang="ts">
import Vue from 'vue';
-import getNoteSummary from '../../../../../misc/get-note-summary';
const displayLimit = 30;
@@ -54,7 +53,6 @@ export default Vue.extend({
requestInitPromise: null as () => Promise<any[]>,
notes: [],
queue: [],
- unreadCount: 0,
fetching: true,
moreFetching: false
};
@@ -83,12 +81,10 @@ export default Vue.extend({
},
mounted() {
- document.addEventListener('visibilitychange', this.onVisibilitychange, false);
window.addEventListener('scroll', this.onScroll, { passive: true });
},
beforeDestroy() {
- document.removeEventListener('visibilitychange', this.onVisibilitychange);
window.removeEventListener('scroll', this.onScroll);
},
@@ -146,10 +142,9 @@ export default Vue.extend({
}
//#endregion
- // 投稿が自分のものではないかつ、タブが非表示またはスクロール位置が最上部ではないならタイトルで通知
- if ((document.hidden || !this.isScrollTop()) && note.userId !== this.$store.state.i.id) {
- this.unreadCount++;
- document.title = `(${this.unreadCount}) ${getNoteSummary(note)}`;
+ // タブが非表示またはスクロール位置が最上部ではないならタイトルで通知
+ if (document.hidden || !this.isScrollTop()) {
+ this.$store.commit('pushBehindNote', note);
}
if (this.isScrollTop()) {
@@ -187,21 +182,9 @@ export default Vue.extend({
this.moreFetching = false;
},
- clearNotification() {
- this.unreadCount = 0;
- document.title = (this as any).os.instanceName;
- },
-
- onVisibilitychange() {
- if (!document.hidden) {
- this.clearNotification();
- }
- },
-
onScroll() {
if (this.isScrollTop()) {
this.releaseQueue();
- this.clearNotification();
}
if (this.$store.state.settings.fetchOnScroll !== false) {