chore (client): remove unnecessary non-null assertions

This commit is contained in:
naskya 2024-04-22 22:44:43 +09:00
parent a49f9c33ef
commit c6d0fe52d2
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
5 changed files with 6 additions and 6 deletions

View file

@ -8,7 +8,7 @@
<i :class="icon('ph-dots-three-outline')"></i> <i :class="icon('ph-dots-three-outline')"></i>
</button> </button>
<button <button
v-if="!hideFollowButton && isSignedIn(me) && me!.id != user.id" v-if="!hideFollowButton && isSignedIn(me) && me.id != user.id"
v-tooltip="full ? null : `${state} ${user.name || user.username}`" v-tooltip="full ? null : `${state} ${user.name || user.username}`"
class="kpoogebi _button follow-button" class="kpoogebi _button follow-button"
:class="{ :class="{

View file

@ -53,7 +53,7 @@ const url = `/${canonical}`;
const isMe = const isMe =
isSignedIn(me) && isSignedIn(me) &&
`@${props.username}@${toUnicode(props.host)}`.toLowerCase() === `@${props.username}@${toUnicode(props.host)}`.toLowerCase() ===
`@${me!.username}@${toUnicode(localHost)}`.toLowerCase(); `@${me.username}@${toUnicode(localHost)}`.toLowerCase();
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View file

@ -370,7 +370,7 @@ const reactButton = ref<HTMLElement | null>(null);
const appearNote = computed(() => const appearNote = computed(() =>
isRenote ? (note.value.renote as NoteType) : note.value, isRenote ? (note.value.renote as NoteType) : note.value,
); );
const isMyRenote = isSignedIn(me) && me!.id === note.value.userId; const isMyRenote = isSignedIn(me) && me.id === note.value.userId;
// const showContent = ref(false); // const showContent = ref(false);
const isDeleted = ref(false); const isDeleted = ref(false);
const muted = ref( const muted = ref(

View file

@ -77,7 +77,7 @@ const hasRenotedBefore = ref(false);
if (isSignedIn(me)) { if (isSignedIn(me)) {
os.api("notes/renotes", { os.api("notes/renotes", {
noteId: props.note.id, noteId: props.note.id,
userId: me!.id, userId: me.id,
limit: 1, limit: 1,
}).then((res) => { }).then((res) => {
hasRenotedBefore.value = res.length > 0; hasRenotedBefore.value = res.length > 0;

View file

@ -59,7 +59,7 @@
<div class="other"> <div class="other">
<button <button
v-if=" v-if="
isSignedIn(me) && me!.id === post.user.id isSignedIn(me) && me.id === post.user.id
" "
v-tooltip="i18n.ts.toEdit" v-tooltip="i18n.ts.toEdit"
v-click-anime v-click-anime
@ -105,7 +105,7 @@
<MkAcct :user="post.user" /> <MkAcct :user="post.user" />
</div> </div>
<MkFollowButton <MkFollowButton
v-if="!isSignedIn(me) || me!.id != post.user.id" v-if="!isSignedIn(me) || me.id != post.user.id"
:user="post.user" :user="post.user"
:inline="true" :inline="true"
:transparent="false" :transparent="false"