mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Adding tutorial card
Summary: For now only html stub and docList adjustement for showing a tutorial card. It will be used in future diffs after tutorial implementation. Test Plan: Manual Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3750
This commit is contained in:
@@ -98,3 +98,17 @@ export function markAsSeen<T>(seenIdsObs: Observable<T[] | undefined>, itemId: T
|
||||
console.warn("Failed to save preference in markAsSeen", e);
|
||||
}
|
||||
}
|
||||
|
||||
export function markAsUnSeen<T>(seenIdsObs: Observable<T[] | undefined>, itemId: T) {
|
||||
const seenIds = seenIdsObs.get() || [];
|
||||
try {
|
||||
if (seenIds.includes(itemId)) {
|
||||
const seen = new Set(seenIds);
|
||||
seen.delete(itemId);
|
||||
seenIdsObs.set([...seen].sort());
|
||||
}
|
||||
} catch (e) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.warn("Failed to save preference in markAsUnSeen", e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user