2020-10-20 19:10:02 +02:00
|
|
|
// @flow
|
|
|
|
|
2022-04-01 10:02:03 +02:00
|
|
|
declare type ContentState = {
|
|
|
|
primaryUri: ?string,
|
2022-05-18 08:31:49 +02:00
|
|
|
playingUri: { uri?: string },
|
2022-04-01 10:02:03 +02:00
|
|
|
positions: { [string]: { [string]: number } }, // claimId: { outpoint: position }
|
|
|
|
history: Array<WatchHistory>,
|
|
|
|
recommendationId: { [string]: string }, // claimId: recommendationId
|
2022-05-18 08:31:49 +02:00
|
|
|
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.
|
2022-05-18 11:01:25 +02:00
|
|
|
lastViewedAnnouncement: ?string, // undefined = not seen in wallet.
|
2022-04-01 10:02:03 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
declare type WatchHistory = {
|
|
|
|
uri: string,
|
|
|
|
lastViewed: number,
|
|
|
|
};
|
|
|
|
|
2020-10-20 19:10:02 +02:00
|
|
|
declare type PlayingUri = {
|
2022-03-15 17:28:55 +01:00
|
|
|
uri?: ?string,
|
|
|
|
primaryUri?: string,
|
|
|
|
pathname?: string,
|
2020-10-20 19:10:02 +02:00
|
|
|
commentId?: string,
|
2022-03-15 17:28:55 +01:00
|
|
|
collectionId?: ?string,
|
2020-10-20 19:10:02 +02:00
|
|
|
source?: string,
|
|
|
|
};
|