Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8e693991b | ||
|
|
7a163f4bde |
@@ -85,8 +85,8 @@ android {
|
||||
applicationId "nl.moeilijkedingen.jellyfinaudioplayer"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 33
|
||||
versionName "2.4.3"
|
||||
versionCode 34
|
||||
versionName "2.4.4"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "fintunes",
|
||||
"version": "2.4.3",
|
||||
"version": "2.4.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "fintunes",
|
||||
"version": "2.4.3",
|
||||
"version": "2.4.4",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@react-native-async-storage/async-storage": "^1.21.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fintunes",
|
||||
"version": "2.4.3",
|
||||
"version": "2.4.4",
|
||||
"main": "src/index.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -21,10 +21,23 @@ async function ensureDirectoryExists() {
|
||||
*/
|
||||
const MigratedStorage: Storage = {
|
||||
async getItem(key) {
|
||||
// Calculate the path where the key should be stored
|
||||
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
|
||||
if (await exists(path)) {
|
||||
if (storeFileExists) {
|
||||
// In which case, we'll read it from disk
|
||||
return readFile(path);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user