feat(tasks): group "Alle Aufgaben" by task list by default
Tasks without a list come first, then the lists in tab order. Single lists keep no grouping by default and do not offer it. The open task list, view and grouping, like the open shopping list, are now remembered per device instead of per tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b04991ee23
commit
2cdfa45375
3 files changed
+110
-36
No files matched your search
@@ -11,7 +11,7 @@ import {
|
||||
} from 'lucide-react';
|
||||
import { ListItem, SharedList, Team, User, WSMessage } from '../../lib/types';
|
||||
import { api, triggerHaptic, createRealtimeConnection } from '../../lib/api';
|
||||
import { readViewSession, writeViewSession } from '../../lib/viewSession';
|
||||
import { readViewMemory, writeViewMemory } from '../../lib/viewSession';
|
||||
import { OFFLINE_ITEM_PREFIX, pendingListItems } from '../../lib/offline';
|
||||
import { UnifiedShareModal } from '../../components/UnifiedShareModal';
|
||||
import { AvatarStack, AvatarPerson } from '../../components/AvatarStack';
|
||||
@@ -91,12 +91,12 @@ export function deduplicateItems(items: ListItem[]): ListItem[] {
|
||||
export const SharedListsView: React.FC<SharedListsViewProps> = ({ onRefreshGlobal, currentUser, initialListId }) => {
|
||||
const { setGroups, setPrimaryAction } = useMobileActions();
|
||||
const [lists, setLists] = useState<SharedList[]>([]);
|
||||
// The open list survives switching to other tabs (like the workspace's open note)
|
||||
// The open list is remembered on this device (other tabs of the app, new tab, restart)
|
||||
const [activeListId, setActiveListId] = useState<string>(
|
||||
() => initialListId || readViewSession<{ listId: string }>('lists').listId || ''
|
||||
() => initialListId || readViewMemory<{ listId: string }>('lists').listId || ''
|
||||
);
|
||||
useEffect(() => {
|
||||
if (activeListId) writeViewSession('lists', { listId: activeListId });
|
||||
if (activeListId) writeViewMemory('lists', { listId: activeListId });
|
||||
}, [activeListId]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user