summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-05-18 15:34:38 +0900
committerGitHub <noreply@github.com>2018-05-18 15:34:38 +0900
commit0d0c45a4cfa541c2d2d4abc2a332ee06ff8e89ef (patch)
treebb848206ce941fdf784418ad18060522d51eec18 /src/client/app/common/scripts
parentNew translations ja.yml (Korean) (diff)
parent2.10.0 (diff)
downloadmisskey-0d0c45a4cfa541c2d2d4abc2a332ee06ff8e89ef.tar.gz
misskey-0d0c45a4cfa541c2d2d4abc2a332ee06ff8e89ef.tar.bz2
misskey-0d0c45a4cfa541c2d2d4abc2a332ee06ff8e89ef.zip
Merge branch 'master' into l10n_master
Diffstat (limited to 'src/client/app/common/scripts')
-rw-r--r--src/client/app/common/scripts/can-hide-text.ts16
-rw-r--r--src/client/app/common/scripts/streaming/home.ts11
2 files changed, 27 insertions, 0 deletions
diff --git a/src/client/app/common/scripts/can-hide-text.ts b/src/client/app/common/scripts/can-hide-text.ts
new file mode 100644
index 0000000000..4a4be8d9d0
--- /dev/null
+++ b/src/client/app/common/scripts/can-hide-text.ts
@@ -0,0 +1,16 @@
+export default function(note) {
+ if (note.text == null) return true;
+
+ let txt = note.text;
+
+ if (note.media) {
+ note.media.forEach(file => {
+ txt = txt.replace(file.url, '');
+ if (file.src) txt = txt.replace(file.src, '');
+ });
+
+ if (txt == '') return true;
+ }
+
+ return false;
+}
diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts
index 32685f3c2c..09d830bece 100644
--- a/src/client/app/common/scripts/streaming/home.ts
+++ b/src/client/app/common/scripts/streaming/home.ts
@@ -48,6 +48,17 @@ export class HomeStream extends Stream {
}
});
+ this.on('mobile_home_updated', x => {
+ if (x.home) {
+ os.store.commit('settings/setMobileHome', x.home);
+ } else {
+ os.store.commit('settings/setMobileHomeWidget', {
+ id: x.id,
+ data: x.data
+ });
+ }
+ });
+
// トークンが再生成されたとき
// このままではMisskeyが利用できないので強制的にサインアウトさせる
this.on('my_token_regenerated', () => {