Rewrite shared feed

This commit is contained in:
Natsumi
2026-01-17 11:44:09 +13:00
parent 56bf69f64e
commit 9f80d5e64a
22 changed files with 534 additions and 841 deletions

View File

@@ -30,15 +30,7 @@ export function useInstanceActivityData() {
async function getWorldNameData() {
worldNameArray.value = await Promise.all(
activityData.value.map(async (item) => {
try {
return await getWorldName(item.location);
} catch {
console.error(
'getWorldName failed location',
item.location
);
return 'Unknown world';
}
return await getWorldName(item.location);
})
);
}

View File

@@ -65,7 +65,7 @@
padding: `${16 * props.cardScale * props.cardSpacing}px`
}));
const avatarFallback = computed(() => props.friend.name.charAt(0) ?? '?');
const avatarFallback = computed(() => props.friend?.name?.charAt(0) ?? '?');
const statusDotClass = computed(() => {
const status = userStatusClass(props.friend.ref, props.friend.pendingOffline);

View File

@@ -100,7 +100,7 @@
const { photonLoggingEnabled } = storeToRefs(usePhotonStore());
const { notyFeedFiltersOptions, wristFeedFiltersOptions, photonFeedFiltersOptions } = feedFiltersOptions();
const { sharedFeedFilters } = storeToRefs(useNotificationsSettingsStore());
const { updateSharedFeed } = useSharedFeedStore();
const { loadSharedFeed } = useSharedFeedStore();
const props = defineProps({
feedFiltersDialogMode: {
@@ -136,7 +136,7 @@
function saveSharedFeedFilters() {
configRepository.setString('sharedFeedFilters', JSON.stringify(sharedFeedFilters.value));
updateSharedFeed(true);
loadSharedFeed();
}
function resetNotyFeedFilters() {