From b01a0325ba8b682da7fc44764d6abb9c320aa90e Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Fri, 11 Feb 2022 22:14:14 +0900
Subject: [PATCH 1/3] =?UTF-8?q?fix(client):=20=E3=83=8E=E3=83=BC=E3=83=88?=
 =?UTF-8?q?=E8=A9=B3=E7=B4=B0=E3=81=8C=E9=96=8B=E3=81=91=E3=81=AA=E3=81=84?=
 =?UTF-8?q?=E3=81=AE=E3=82=92=E7=9B=B4=E3=81=97=E3=81=9F=E3=82=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix #8305
---
 CHANGELOG.md                                  |  8 +++++++
 .../client/src/components/note-detailed.vue   | 23 +++++++++++--------
 packages/client/src/components/note.vue       |  2 +-
 3 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 81981e8ae..1a396102b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,14 @@
 You should also include the user name that made the change.
 -->
 
+## 12.x.x (unreleased)
+
+### Improvements
+- 
+
+### Bugfixes
+- クライアント: ノートの詳細が表示されない問題を修正 @syuilo
+
 ## 12.106.2 (2022/02/11)
 
 ### Bugfixes
diff --git a/packages/client/src/components/note-detailed.vue b/packages/client/src/components/note-detailed.vue
index 5fc3a0f33..80233d608 100644
--- a/packages/client/src/components/note-detailed.vue
+++ b/packages/client/src/components/note-detailed.vue
@@ -154,11 +154,13 @@ const props = defineProps<{
 
 const inChannel = inject('inChannel', null);
 
+const note = $ref(JSON.parse(JSON.stringify(props.note)));
+
 const isRenote = (
-	props.note.renote != null &&
-	props.note.text == null &&
-	props.note.fileIds.length === 0 &&
-	props.note.poll == null
+	note.renote != null &&
+	note.text == null &&
+	note.fileIds.length === 0 &&
+	note.poll == null
 );
 
 const el = ref<HTMLElement>();
@@ -166,8 +168,8 @@ const menuButton = ref<HTMLElement>();
 const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
 const renoteTime = ref<HTMLElement>();
 const reactButton = ref<HTMLElement>();
-let appearNote = $ref(isRenote ? props.note.renote as misskey.entities.Note : props.note);
-const isMyRenote = $i && ($i.id === props.note.userId);
+let appearNote = $ref(isRenote ? note.renote as misskey.entities.Note : note);
+const isMyRenote = $i && ($i.id === note.userId);
 const showContent = ref(false);
 const isDeleted = ref(false);
 const muted = ref(checkWordMute(appearNote, $i, defaultStore.state.mutedWords));
@@ -188,8 +190,9 @@ const keymap = {
 };
 
 useNoteCapture({
-	appearNote: $$(appearNote),
 	rootEl: el,
+	note: $$(appearNote),
+	isDeletedRef: isDeleted,
 });
 
 function reply(viaKeyboard = false): void {
@@ -237,12 +240,12 @@ function onContextmenu(ev: MouseEvent): void {
 		ev.preventDefault();
 		react();
 	} else {
-		os.contextMenu(getNoteMenu({ note: props.note, translating, translation, menuButton }), ev).then(focus);
+		os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton }), ev).then(focus);
 	}
 }
 
 function menu(viaKeyboard = false): void {
-	os.popupMenu(getNoteMenu({ note: props.note, translating, translation, menuButton }), menuButton.value, {
+	os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton }), menuButton.value, {
 		viaKeyboard
 	}).then(focus);
 }
@@ -255,7 +258,7 @@ function showRenoteMenu(viaKeyboard = false): void {
 		danger: true,
 		action: () => {
 			os.api('notes/delete', {
-				noteId: props.note.id
+				noteId: note.id
 			});
 			isDeleted.value = true;
 		}
diff --git a/packages/client/src/components/note.vue b/packages/client/src/components/note.vue
index 7cf5fb047..93286a28b 100644
--- a/packages/client/src/components/note.vue
+++ b/packages/client/src/components/note.vue
@@ -180,7 +180,7 @@ const keymap = {
 useNoteCapture({
 	rootEl: el,
 	note: $$(appearNote),
-	isDeletedRef: $$(isDeleted),
+	isDeletedRef: isDeleted,
 });
 
 function reply(viaKeyboard = false): void {

From c1f0fa5bd6b2f6b5f8c46375bc32e54c9c985844 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Fri, 11 Feb 2022 22:16:20 +0900
Subject: [PATCH 2/3] enhance(client): tweak padding

---
 CHANGELOG.md                                     | 2 +-
 packages/client/src/components/global/spacer.vue | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1a396102b..dfed918d6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,7 +13,7 @@ You should also include the user name that made the change.
 ## 12.x.x (unreleased)
 
 ### Improvements
-- 
+- クライアント: スマートフォンでの余白を調整 @syuilo
 
 ### Bugfixes
 - クライアント: ノートの詳細が表示されない問題を修正 @syuilo
diff --git a/packages/client/src/components/global/spacer.vue b/packages/client/src/components/global/spacer.vue
index 8a1d7a4e8..f2eda1907 100644
--- a/packages/client/src/components/global/spacer.vue
+++ b/packages/client/src/components/global/spacer.vue
@@ -7,6 +7,7 @@
 </template>
 
 <script lang="ts">
+import { deviceKind } from '@/scripts/device-kind';
 import { defineComponent, inject, onMounted, onUnmounted, ref } from 'vue';
 
 export default defineComponent({
@@ -35,7 +36,7 @@ export default defineComponent({
 		const margin = ref(0);
 		const shouldSpacerMin = inject('shouldSpacerMin', false);
 		const adjust = (rect: { width: number; height: number; }) => {
-			if (shouldSpacerMin) {
+			if (shouldSpacerMin || deviceKind === 'smartphone') {
 				margin.value = props.marginMin;
 				return;
 			}

From 3cf9c3097498acb2b6e4c3a5133fe900f7877ba8 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Fri, 11 Feb 2022 22:17:06 +0900
Subject: [PATCH 3/3] 12.106.3

---
 CHANGELOG.md | 2 +-
 package.json | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index dfed918d6..bed70f918 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,7 +10,7 @@
 You should also include the user name that made the change.
 -->
 
-## 12.x.x (unreleased)
+## 12.106.3 (2022/02/11)
 
 ### Improvements
 - クライアント: スマートフォンでの余白を調整 @syuilo
diff --git a/package.json b/package.json
index dbf3f2e00..993a16939 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "misskey",
-	"version": "12.106.2",
+	"version": "12.106.3",
 	"codename": "indigo",
 	"repository": {
 		"type": "git",