Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8e693991b | ||
|
|
7a163f4bde |
@@ -85,8 +85,8 @@ android {
|
|||||||
applicationId "nl.moeilijkedingen.jellyfinaudioplayer"
|
applicationId "nl.moeilijkedingen.jellyfinaudioplayer"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 33
|
versionCode 34
|
||||||
versionName "2.4.3"
|
versionName "2.4.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "fintunes",
|
"name": "fintunes",
|
||||||
"version": "2.4.3",
|
"version": "2.4.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "fintunes",
|
"name": "fintunes",
|
||||||
"version": "2.4.3",
|
"version": "2.4.4",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-native-async-storage/async-storage": "^1.21.0",
|
"@react-native-async-storage/async-storage": "^1.21.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fintunes",
|
"name": "fintunes",
|
||||||
"version": "2.4.3",
|
"version": "2.4.4",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -21,10 +21,23 @@ async function ensureDirectoryExists() {
|
|||||||
*/
|
*/
|
||||||
const MigratedStorage: Storage = {
|
const MigratedStorage: Storage = {
|
||||||
async getItem(key) {
|
async getItem(key) {
|
||||||
|
// Calculate the path where the key should be stored
|
||||||
const path = getFileByKey(key);
|
const path = getFileByKey(key);
|
||||||
|
|
||||||
|
// By default, the key for the persistor is "persist:root", which
|
||||||
|
// contains a special character. We run the key through
|
||||||
|
// `encodeURIcomponent`, so we don't trigger any special character
|
||||||
|
// filename errors. However, on Android, react-native-fs doesn't resolve
|
||||||
|
// the paths properly and fails to find the encoded variant. Hence,
|
||||||
|
// we'll also "unencode" the variant and check for existence of any of
|
||||||
|
// the two files.
|
||||||
|
const storeFileExists = (await Promise.all([
|
||||||
|
exists(path),
|
||||||
|
exists(decodeURIComponent(path))
|
||||||
|
])).some((d) => d === true);
|
||||||
|
|
||||||
// GUARD: Check whether a store already exists on the filesystem
|
// GUARD: Check whether a store already exists on the filesystem
|
||||||
if (await exists(path)) {
|
if (storeFileExists) {
|
||||||
// In which case, we'll read it from disk
|
// In which case, we'll read it from disk
|
||||||
return readFile(path);
|
return readFile(path);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user