diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue
index a776e40a2..6a243ca56 100644
--- a/src/client/app/desktop/views/components/timeline.vue
+++ b/src/client/app/desktop/views/components/timeline.vue
@@ -31,8 +31,29 @@ export default Vue.extend({
};
},
+ watch: {
+ src() {
+ this.$store.commit('device/setTl', {
+ src: this.src,
+ arg: this.list
+ });
+ },
+
+ list() {
+ this.$store.commit('device/setTl', {
+ src: this.src,
+ arg: this.list
+ });
+ }
+ },
+
created() {
- if ((this as any).os.i.followingCount == 0) {
+ if (this.$store.state.device.tl) {
+ this.src = this.$store.state.device.tl.src;
+ if (this.src == 'list') {
+ this.list = this.$store.state.device.tl.arg;
+ }
+ } else if ((this as any).os.i.followingCount == 0) {
this.src = 'local';
}
},
diff --git a/src/client/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue
index 5701ff03d..8d10d96c8 100644
--- a/src/client/app/mobile/views/pages/home.vue
+++ b/src/client/app/mobile/views/pages/home.vue
@@ -5,7 +5,7 @@
%fa:home%%i18n:@home%
%fa:R comments%%i18n:@local%
%fa:globe%%i18n:@global%
- %fa:list%{{ list.title }}
+ %fa:list%{{ list.title }}
%fa:angle-down%
@@ -26,17 +26,17 @@
%fa:R comments% %i18n:@local%
%fa:globe% %i18n:@global%
- %fa:list% {{ l.title }}
+ %fa:list% {{ l.title }}
-
+
-
+
@@ -64,6 +64,20 @@ export default Vue.extend({
watch: {
src() {
this.showNav = false;
+
+ this.$store.commit('device/setTl', {
+ src: this.src,
+ arg: this.list
+ });
+ },
+
+ list() {
+ this.showNav = false;
+
+ this.$store.commit('device/setTl', {
+ src: this.src,
+ arg: this.list
+ });
},
showNav(v) {
@@ -76,7 +90,12 @@ export default Vue.extend({
},
created() {
- if ((this as any).os.i.followingCount == 0) {
+ if (this.$store.state.device.tl) {
+ this.src = this.$store.state.device.tl.src;
+ if (this.src == 'list') {
+ this.list = this.$store.state.device.tl.arg;
+ }
+ } else if ((this as any).os.i.followingCount == 0) {
this.src = 'local';
}
},
@@ -85,6 +104,10 @@ export default Vue.extend({
document.title = 'Misskey';
Progress.start();
+
+ (this.$refs.tl as any).$once('loaded', () => {
+ Progress.done();
+ });
},
methods: {
@@ -92,10 +115,6 @@ export default Vue.extend({
(this as any).apis.post();
},
- onLoaded() {
- Progress.done();
- },
-
warp() {
}
diff --git a/src/client/app/store.ts b/src/client/app/store.ts
index e300d31d8..e787b4146 100644
--- a/src/client/app/store.ts
+++ b/src/client/app/store.ts
@@ -68,6 +68,13 @@ export default (os: MiOS) => new Vuex.Store({
mutations: {
set(state, x: { key: string; value: any }) {
state[x.key] = x.value;
+ },
+
+ setTl(state, x) {
+ state.tl = {
+ src: x.src,
+ arg: x.arg
+ };
}
}
},