リプライで元の公開範囲を引き継ぐ (#2775)
* ホーム/フォロワー限定へのリプライは公開範囲を引き継ぐように * ダイレクトへのリプライはダイレクトでリプライ先ユーザーを初期設定するように * 非公開へのリプライでも元の公開範囲を引き継ぐ
This commit is contained in:
		
							parent
							
								
									f6e4a1770e
								
							
						
					
					
						commit
						77b441f14c
					
				
					 2 changed files with 24 additions and 0 deletions
				
			
		| 
						 | 
					@ -178,6 +178,18 @@ export default Vue.extend({
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 公開以外へのリプライ時は元の公開範囲を引き継ぐ
 | 
				
			||||||
 | 
							if (this.reply && ['home', 'followers', 'specified', 'private'].includes(this.reply.visibility)) {
 | 
				
			||||||
 | 
								this.visibility = this.reply.visibility;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// ダイレクトへのリプライはリプライ先ユーザーを初期設定
 | 
				
			||||||
 | 
							if (this.reply && this.reply.visibility === 'specified') {
 | 
				
			||||||
 | 
								(this as any).api('users/show', {	userId: this.reply.userId }).then(user => {
 | 
				
			||||||
 | 
									this.visibleUsers.push(user);
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.$nextTick(() => {
 | 
							this.$nextTick(() => {
 | 
				
			||||||
			// 書きかけの投稿を復元
 | 
								// 書きかけの投稿を復元
 | 
				
			||||||
			if (!this.instant) {
 | 
								if (!this.instant) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -173,6 +173,18 @@ export default Vue.extend({
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 公開以外へのリプライ時は元の公開範囲を引き継ぐ
 | 
				
			||||||
 | 
							if (this.reply && ['home', 'followers', 'specified', 'private'].includes(this.reply.visibility)) {
 | 
				
			||||||
 | 
								this.visibility = this.reply.visibility;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// ダイレクトへのリプライはリプライ先ユーザーを初期設定
 | 
				
			||||||
 | 
							if (this.reply && this.reply.visibility === 'specified') {
 | 
				
			||||||
 | 
								(this as any).api('users/show', {	userId: this.reply.userId }).then(user => {
 | 
				
			||||||
 | 
									this.visibleUsers.push(user);
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.focus();
 | 
							this.focus();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.$nextTick(() => {
 | 
							this.$nextTick(() => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue