Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagarei committed Jan 3, 2025
1 parent 059cf58 commit 5369b3b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/store/ui/messageInputStateStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ const useMessageInputStateStorePinia = defineStore(
'ui/messageInputStateStore',
() => {
const initialValue = {
messageInputState: new Map<
ChannelId,
MessageInputState
>()
messageInputState: new Map<ChannelId, MessageInputState>()

Check warning on line 42 in src/store/ui/messageInputStateStore.ts

View check run for this annotation

Codecov / codecov/patch

src/store/ui/messageInputStateStore.ts#L42

Added line #L42 was not covered by tests
}

const [state, restoring, restoringPromise] = useIndexedDbValue(
Expand All @@ -67,12 +64,12 @@ const useMessageInputStateStorePinia = defineStore(

const getStore = (cId: MessageInputStateKey) => {
const cId_ = unref(cId)
const st = (virtualIds.has(cId_) ? virtualChannelStates : states)
const st = virtualIds.has(cId_) ? virtualChannelStates : states
return st.value.get(cId_)
}

Check warning on line 69 in src/store/ui/messageInputStateStore.ts

View check run for this annotation

Codecov / codecov/patch

src/store/ui/messageInputStateStore.ts#L65-L69

Added lines #L65 - L69 were not covered by tests
const setStore = (cId: MessageInputStateKey, v: MessageInputState) => {
const cId_ = unref(cId)
const st = (virtualIds.has(cId_) ? virtualChannelStates : states)
const st = virtualIds.has(cId_) ? virtualChannelStates : states

Check warning on line 72 in src/store/ui/messageInputStateStore.ts

View check run for this annotation

Codecov / codecov/patch

src/store/ui/messageInputStateStore.ts#L71-L72

Added lines #L71 - L72 were not covered by tests
// 空のときは削除、空でないときはセット
if (v && (v.text !== '' || v.attachments.length > 0)) {
// コピーしないと参照が変わらないから上書きされる
Expand Down

0 comments on commit 5369b3b

Please sign in to comment.