79eb28cc55
This stores the hash for the last viewed announcement. The intention is so that the announcement won't re-appear when logging into another device. However, this does mean that announcements would need to wait until the first sync to decide whether to appear or not, which can be quite a delay.
33 lines
1.2 KiB
JavaScript
33 lines
1.2 KiB
JavaScript
// @flow
|
|
|
|
declare type ContentState = {
|
|
primaryUri: ?string,
|
|
playingUri: { uri?: string },
|
|
positions: { [string]: { [string]: number } }, // claimId: { outpoint: position }
|
|
history: Array<WatchHistory>,
|
|
recommendationId: { [string]: string }, // claimId: recommendationId
|
|
recommendationParentId: { [string]: string }, // claimId: referrerId
|
|
recommendationUrls: { [string]: Array<string> }, // claimId: [lbryUrls...]
|
|
recommendationClicks: { [string]: Array<number> }, // "claimId": [clicked indices...]
|
|
loopList?: { collectionId: string, loop: boolean },
|
|
shuffleList?: { collectionId: string, newUrls: Array<string> | boolean },
|
|
// TODO: it's confusing for newUrls to be a boolean --------- ^^^
|
|
// It can/should be '?Array<string>` instead -- set it to null, then clients
|
|
// can cast it to a boolean. That, or rename the variable to `shuffle` if you
|
|
// don't care about the URLs.
|
|
lastViewedAnnouncement: ?string, // undefined = not seen in wallet.
|
|
};
|
|
|
|
declare type WatchHistory = {
|
|
uri: string,
|
|
lastViewed: number,
|
|
};
|
|
|
|
declare type PlayingUri = {
|
|
uri?: ?string,
|
|
primaryUri?: string,
|
|
pathname?: string,
|
|
commentId?: string,
|
|
collectionId?: ?string,
|
|
source?: string,
|
|
};
|