remove unnecessary code
This commit is contained in:
parent
1ea5b86e71
commit
9ca1b41a01
|
@ -29,7 +29,6 @@ import { $i, iAmModerator } from '@/account.js';
|
||||||
import { instance } from '@/instance.js';
|
import { instance } from '@/instance.js';
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
import { Paging } from '@/components/MkPagination.vue';
|
import { Paging } from '@/components/MkPagination.vue';
|
||||||
import { generateClientTransactionId } from '@/scripts/misskey-api.js';
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
src: BasicTimelineType | 'mentions' | 'directs' | 'list' | 'antenna' | 'channel' | 'role';
|
src: BasicTimelineType | 'mentions' | 'directs' | 'list' | 'antenna' | 'channel' | 'role';
|
||||||
|
@ -82,23 +81,9 @@ async function prepend(data) {
|
||||||
// チェックするプロパティはなんでも良い
|
// チェックするプロパティはなんでも良い
|
||||||
// minimizeが有効でid以外が存在しない場合は取得する
|
// minimizeが有効でid以外が存在しない場合は取得する
|
||||||
if (!data.visibility) {
|
if (!data.visibility) {
|
||||||
const initiateTime = Date.now();
|
|
||||||
const res = await window.fetch(`/notes/${data.id}.json`, {
|
const res = await window.fetch(`/notes/${data.id}.json`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
credentials: 'omit',
|
credentials: 'omit',
|
||||||
headers: {
|
|
||||||
'Authorization': 'anonymous',
|
|
||||||
'X-Client-Transaction-Id': generateClientTransactionId('misskey'),
|
|
||||||
},
|
|
||||||
}).then(res => {
|
|
||||||
if (instance.googleAnalyticsId) {
|
|
||||||
gtagTime({
|
|
||||||
name: 'api-get',
|
|
||||||
event_category: `/notes/${data.id}.json`,
|
|
||||||
value: Date.now() - initiateTime,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
});
|
});
|
||||||
if (!res.ok) return;
|
if (!res.ok) return;
|
||||||
note = deepMerge(data, await res.json());
|
note = deepMerge(data, await res.json());
|
||||||
|
|
Loading…
Reference in New Issue