From dbd9d11d6749245947381c8b4d72a76347406bfb Mon Sep 17 00:00:00 2001
From: Soni L <EnderMoneyMod@gmail.com>
Date: Sat, 25 Feb 2023 23:14:07 -0300
Subject: [PATCH] Simplify search.vue (remove dead code) (#10088)

* Simplify search.vue

This is already handled by the code above it, no need to handle it twice

* Remove unused imports
---
 packages/frontend/src/pages/search.vue | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/packages/frontend/src/pages/search.vue b/packages/frontend/src/pages/search.vue
index d32bdcd78..7e81cd2c0 100644
--- a/packages/frontend/src/pages/search.vue
+++ b/packages/frontend/src/pages/search.vue
@@ -37,7 +37,6 @@ import { i18n } from '@/i18n';
 import { definePageMetadata } from '@/scripts/page-metadata';
 import * as os from '@/os';
 import { useRouter, mainRouter } from '@/router';
-import { $i } from '@/account';
 
 const router = useRouter();
 
@@ -116,24 +115,6 @@ const search = async () => {
 		return;
 	}
 
-	if ($i != null) {
-		if (query.startsWith('https://') || (query.startsWith('@') && !query.includes(' '))) {
-			const promise = os.api('ap/show', {
-				uri: query,
-			});
-
-			os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject);
-
-			const res = await promise;
-
-			if (res.type === 'User') {
-				router.replace(`/@${res.object.username}@${res.object.host}`);
-			} else if (res.type === 'Note') {
-				router.replace(`/notes/${res.object.id}`);
-			}
-		}
-	}
-
 	window.history.replaceState('', '', `/search?q=${encodeURIComponent(query)}&type=${searchType}${searchType === 'user' ? `&origin=${searchOrigin}` : ''}`);
 };