This commit is contained in:
tamaina 2023-07-19 03:23:31 +00:00
parent e9486d0085
commit 4aee99b61a
3 changed files with 14 additions and 1 deletions

View File

@ -68,6 +68,7 @@
"tsconfig-paths": "4.2.0", "tsconfig-paths": "4.2.0",
"twemoji-parser": "14.0.0", "twemoji-parser": "14.0.0",
"typescript": "5.1.6", "typescript": "5.1.6",
"ua-parser-js": "2.0.0-alpha.2",
"uuid": "9.0.0", "uuid": "9.0.0",
"vanilla-tilt": "1.8.0", "vanilla-tilt": "1.8.0",
"vite": "4.4.4", "vite": "4.4.4",

View File

@ -47,6 +47,7 @@ import MkButton from '@/components/MkButton.vue';
import { defaultStore } from '@/store'; import { defaultStore } from '@/store';
import { MisskeyEntity } from '@/types/date-separated-list'; import { MisskeyEntity } from '@/types/date-separated-list';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
import { UAParser } from 'ua-parser-js';
const SECOND_FETCH_LIMIT = 30; const SECOND_FETCH_LIMIT = 30;
const TOLERANCE = 6; const TOLERANCE = 6;
@ -92,6 +93,10 @@ function arrayToEntries(entities: MisskeyEntity[]): [string, MisskeyEntity][] {
function concatMapWithArray(map: MisskeyEntityMap, entities: MisskeyEntity[]): MisskeyEntityMap { function concatMapWithArray(map: MisskeyEntityMap, entities: MisskeyEntity[]): MisskeyEntityMap {
return new Map([...map, ...arrayToEntries(entities)]); return new Map([...map, ...arrayToEntries(entities)]);
} }
const ua = new UAParser(navigator.userAgent);
const isWebKit = ua.getEngine().name === 'WebKit';
console.log('isWebKit', isWebKit);
</script> </script>
<script lang="ts" setup> <script lang="ts" setup>
import { infoImageUrl } from '@/instance'; import { infoImageUrl } from '@/instance';
@ -457,7 +462,7 @@ const prepend = (item: MisskeyEntity): void => {
// //
if (items.value.has(item.id)) return; // if (items.value.has(item.id)) return; //
unshiftItems([item]); unshiftItems([item]);
} else if (!weakBacked) { } else if (!isWebKit && !weakBacked) {
// 調 // 調
prependQueue(item); prependQueue(item);
executeQueue(); executeQueue();

View File

@ -787,6 +787,9 @@ importers:
typescript: typescript:
specifier: 5.1.6 specifier: 5.1.6
version: 5.1.6 version: 5.1.6
ua-parser-js:
specifier: 2.0.0-alpha.2
version: 2.0.0-alpha.2
uuid: uuid:
specifier: 9.0.0 specifier: 9.0.0
version: 9.0.0 version: 9.0.0
@ -20334,6 +20337,10 @@ packages:
engines: {node: '>=14.17'} engines: {node: '>=14.17'}
hasBin: true hasBin: true
/ua-parser-js@2.0.0-alpha.2:
resolution: {integrity: sha512-Vz+BJN/EFC1OaUv0eu5kPyX7HEZIO7Dv29jIK7rMuKjUB1qqq+Is/XIpu5iV5XDvoNl62dM7ay8DtzYjBDI0WA==}
dev: false
/ufo@1.1.2: /ufo@1.1.2:
resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==}
dev: true dev: true