From fbfe42d6f007c5465eb55f3f7dd5708f8590d545 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Mon, 16 Jan 2023 05:29:44 +0900
Subject: enhance(client): improve usability of user select

---
 packages/frontend/src/components/MkUserSelectDialog.vue | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'packages/frontend/src/components/MkUserSelectDialog.vue')

diff --git a/packages/frontend/src/components/MkUserSelectDialog.vue b/packages/frontend/src/components/MkUserSelectDialog.vue
index 4c79979cb7..49b421818a 100644
--- a/packages/frontend/src/components/MkUserSelectDialog.vue
+++ b/packages/frontend/src/components/MkUserSelectDialog.vue
@@ -60,6 +60,7 @@ import MkModalWindow from '@/components/MkModalWindow.vue';
 import * as os from '@/os';
 import { defaultStore } from '@/store';
 import { i18n } from '@/i18n';
+import { $i } from '@/account';
 
 const emit = defineEmits<{
 	(ev: 'ok', selected: misskey.entities.UserDetailed): void;
@@ -67,6 +68,10 @@ const emit = defineEmits<{
 	(ev: 'closed'): void;
 }>();
 
+const props = defineProps<{
+	includeSelf?: boolean;
+}>();
+
 let username = $ref('');
 let host = $ref('');
 let users: misskey.entities.UserDetailed[] = $ref([]);
@@ -110,7 +115,11 @@ onMounted(() => {
 	os.api('users/show', {
 		userIds: defaultStore.state.recentlyUsedUsers,
 	}).then(users => {
-		recentUsers = users;
+		if (props.includeSelf) {
+			recentUsers = [$i, ...users];
+		} else {
+			recentUsers = users;
+		}
 	});
 });
 </script>
-- 
cgit v1.2.3-freya

