persist everything on tv
This commit is contained in:
parent
a0f4bf7830
commit
0a92b62fb7
2 changed files with 21 additions and 24 deletions
|
@ -97,27 +97,28 @@ Lbryio.setOverride(
|
|||
'getAuthToken',
|
||||
() =>
|
||||
new Promise(resolve => {
|
||||
// @if TARGET='app'
|
||||
if (authToken) {
|
||||
resolve(authToken);
|
||||
} else {
|
||||
// @if TARGET='app'
|
||||
ipcRenderer.once('auth-token-response', (event, token) => {
|
||||
Lbryio.authToken = token;
|
||||
resolve(token);
|
||||
});
|
||||
|
||||
ipcRenderer.send('get-auth-token');
|
||||
// @endif
|
||||
// @if TARGET='web'
|
||||
const authToken = getAuthToken();
|
||||
|
||||
if (authToken) {
|
||||
Lbry.setApiHeader(X_LBRY_AUTH_TOKEN, authToken);
|
||||
}
|
||||
|
||||
resolve(authToken);
|
||||
// @endif
|
||||
}
|
||||
|
||||
ipcRenderer.once('auth-token-response', (event, token) => {
|
||||
Lbryio.authToken = token;
|
||||
resolve(token);
|
||||
});
|
||||
|
||||
ipcRenderer.send('get-auth-token');
|
||||
// @endif
|
||||
|
||||
// @if TARGET='web'
|
||||
const authTokenToReturn = authToken || getAuthToken();
|
||||
|
||||
if (authTokenToReturn !== null) {
|
||||
Lbry.setApiHeader(X_LBRY_AUTH_TOKEN, authTokenToReturn);
|
||||
}
|
||||
|
||||
resolve(authTokenToReturn);
|
||||
// @endif
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
@ -57,12 +57,10 @@ const tagsFilter = createFilter('tags', ['followedTags']);
|
|||
const subscriptionsFilter = createFilter('subscriptions', ['subscriptions']);
|
||||
const blockedFilter = createFilter('blocked', ['blockedChannels']);
|
||||
const whiteListedReducers = [
|
||||
// @if TARGET='app'
|
||||
'fileInfo',
|
||||
'publish',
|
||||
'wallet',
|
||||
'tags',
|
||||
// 'fileInfo',
|
||||
// @endif
|
||||
'content',
|
||||
'app',
|
||||
'search',
|
||||
|
@ -72,12 +70,10 @@ const whiteListedReducers = [
|
|||
];
|
||||
|
||||
const transforms = [
|
||||
// @if TARGET='app'
|
||||
walletFilter,
|
||||
fileInfoFilter,
|
||||
walletFilter,
|
||||
blockedFilter,
|
||||
tagsFilter,
|
||||
// @endif
|
||||
appFilter,
|
||||
searchFilter,
|
||||
tagsFilter,
|
||||
|
|
Loading…
Reference in a new issue