mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	avoid renoteCollapsed dependency in inReplyToCollapsed
This commit is contained in:
		
							parent
							
								
									460e7f05ab
								
							
						
					
					
						commit
						c149734fba
					
				
					 2 changed files with 10 additions and 12 deletions
				
			
		| 
						 | 
					@ -311,13 +311,12 @@ const translation = ref<Misskey.entities.NotesTranslateResponse | null>(null);
 | 
				
			||||||
const translating = ref(false);
 | 
					const translating = ref(false);
 | 
				
			||||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
 | 
					const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
 | 
				
			||||||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
 | 
					const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
 | 
				
			||||||
const renoteCollapsed = ref(
 | 
					const renoteCollapsedInitialValue = defaultStore.state.collapseRenotes && isRenote && (
 | 
				
			||||||
	defaultStore.state.collapseRenotes && isRenote && (
 | 
						($i && ($i.id === note.value.userId || $i.id === appearNote.value.userId)) || // `||` must be `||`! See https://github.com/misskey-dev/misskey/issues/13131
 | 
				
			||||||
		($i && ($i.id === note.value.userId || $i.id === appearNote.value.userId)) || // `||` must be `||`! See https://github.com/misskey-dev/misskey/issues/13131
 | 
						(appearNote.value.myReaction != null)
 | 
				
			||||||
		(appearNote.value.myReaction != null)
 | 
					 | 
				
			||||||
	)
 | 
					 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
const inReplyToCollapsed = ref(defaultStore.state.collapseNotesRepliedTo && !renoteCollapsed.value);
 | 
					const renoteCollapsed = ref(renoteCollapsedInitialValue);
 | 
				
			||||||
 | 
					const inReplyToCollapsed = ref(defaultStore.state.collapseNotesRepliedTo && !renoteCollapsedInitialValue);
 | 
				
			||||||
const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
 | 
					const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
 | 
				
			||||||
const animated = computed(() => parsed.value ? checkAnimationFromMfm(parsed.value) : null);
 | 
					const animated = computed(() => parsed.value ? checkAnimationFromMfm(parsed.value) : null);
 | 
				
			||||||
const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);
 | 
					const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -311,13 +311,12 @@ const translation = ref<Misskey.entities.NotesTranslateResponse | null>(null);
 | 
				
			||||||
const translating = ref(false);
 | 
					const translating = ref(false);
 | 
				
			||||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
 | 
					const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
 | 
				
			||||||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
 | 
					const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
 | 
				
			||||||
const renoteCollapsed = ref(
 | 
					const renoteCollapsedInitialValue = defaultStore.state.collapseRenotes && isRenote && (
 | 
				
			||||||
	defaultStore.state.collapseRenotes && isRenote && (
 | 
						($i && ($i.id === note.value.userId || $i.id === appearNote.value.userId)) || // `||` must be `||`! See https://github.com/misskey-dev/misskey/issues/13131
 | 
				
			||||||
		($i && ($i.id === note.value.userId || $i.id === appearNote.value.userId)) || // `||` must be `||`! See https://github.com/misskey-dev/misskey/issues/13131
 | 
						(appearNote.value.myReaction != null)
 | 
				
			||||||
		(appearNote.value.myReaction != null)
 | 
					 | 
				
			||||||
	)
 | 
					 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
const inReplyToCollapsed = ref(defaultStore.state.collapseNotesRepliedTo && !renoteCollapsed.value);
 | 
					const renoteCollapsed = ref(renoteCollapsedInitialValue);
 | 
				
			||||||
 | 
					const inReplyToCollapsed = ref(defaultStore.state.collapseNotesRepliedTo && !renoteCollapsedInitialValue);
 | 
				
			||||||
const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
 | 
					const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
 | 
				
			||||||
const animated = computed(() => parsed.value ? checkAnimationFromMfm(parsed.value) : null);
 | 
					const animated = computed(() => parsed.value ? checkAnimationFromMfm(parsed.value) : null);
 | 
				
			||||||
const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);
 | 
					const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue