test...
This commit is contained in:
parent
e9486d0085
commit
4aee99b61a
|
@ -68,6 +68,7 @@
|
|||
"tsconfig-paths": "4.2.0",
|
||||
"twemoji-parser": "14.0.0",
|
||||
"typescript": "5.1.6",
|
||||
"ua-parser-js": "2.0.0-alpha.2",
|
||||
"uuid": "9.0.0",
|
||||
"vanilla-tilt": "1.8.0",
|
||||
"vite": "4.4.4",
|
||||
|
|
|
@ -47,6 +47,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||
import { defaultStore } from '@/store';
|
||||
import { MisskeyEntity } from '@/types/date-separated-list';
|
||||
import { i18n } from '@/i18n';
|
||||
import { UAParser } from 'ua-parser-js';
|
||||
|
||||
const SECOND_FETCH_LIMIT = 30;
|
||||
const TOLERANCE = 6;
|
||||
|
@ -92,6 +93,10 @@ function arrayToEntries(entities: MisskeyEntity[]): [string, MisskeyEntity][] {
|
|||
function concatMapWithArray(map: MisskeyEntityMap, entities: MisskeyEntity[]): MisskeyEntityMap {
|
||||
return new Map([...map, ...arrayToEntries(entities)]);
|
||||
}
|
||||
|
||||
const ua = new UAParser(navigator.userAgent);
|
||||
const isWebKit = ua.getEngine().name === 'WebKit';
|
||||
console.log('isWebKit', isWebKit);
|
||||
</script>
|
||||
<script lang="ts" setup>
|
||||
import { infoImageUrl } from '@/instance';
|
||||
|
@ -457,7 +462,7 @@ const prepend = (item: MisskeyEntity): void => {
|
|||
// かなりスクロールの先頭にいる場合
|
||||
if (items.value.has(item.id)) return; // 既にタイムラインにある場合は何もしない
|
||||
unshiftItems([item]);
|
||||
} else if (!weakBacked) {
|
||||
} else if (!isWebKit && !weakBacked) {
|
||||
// ちょっと先頭にいる場合はスクロールを調整する
|
||||
prependQueue(item);
|
||||
executeQueue();
|
||||
|
|
|
@ -787,6 +787,9 @@ importers:
|
|||
typescript:
|
||||
specifier: 5.1.6
|
||||
version: 5.1.6
|
||||
ua-parser-js:
|
||||
specifier: 2.0.0-alpha.2
|
||||
version: 2.0.0-alpha.2
|
||||
uuid:
|
||||
specifier: 9.0.0
|
||||
version: 9.0.0
|
||||
|
@ -20334,6 +20337,10 @@ packages:
|
|||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
/ua-parser-js@2.0.0-alpha.2:
|
||||
resolution: {integrity: sha512-Vz+BJN/EFC1OaUv0eu5kPyX7HEZIO7Dv29jIK7rMuKjUB1qqq+Is/XIpu5iV5XDvoNl62dM7ay8DtzYjBDI0WA==}
|
||||
dev: false
|
||||
|
||||
/ufo@1.1.2:
|
||||
resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==}
|
||||
dev: true
|
||||
|
|
Loading…
Reference in New Issue