Skip to content

Commit 9fd1aea

Browse files
Fix: Fixed the backup System.
1 parent 26b125c commit 9fd1aea

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

CHANGELOG.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,14 @@ All notable changes to this project will be documented in this file. See [conven
44

55
## [Coming Soon](https://github.com/DroidWorksStudio/EasyLauncher/tree/HEAD)
66

7-
### Releases:
8-
9-
- Prepare for version 0.3.3 - ([c82c05e](https://github.com/DroidWorksStudio/EasyLauncher/commit/c82c05e1c6b33f5936a442f0764482d4cd2d9221))
10-
11-
## [0.3.2](https://github.com/DroidWorksStudio/EasyLauncher/tree/0.3.2) - (04, December 2024)
12-
137
### Implemented Enhancements:
148

159
- Added the ability for restore to also run a clear list before restoring. - ([ac4456d](https://github.com/DroidWorksStudio/EasyLauncher/commit/ac4456dac42445d7cee3c51b549a7c4542268367))
1610
- Added the ability to backup and restore apps. - ([b874d55](https://github.com/DroidWorksStudio/EasyLauncher/commit/b874d5556965d6772ddd1428dfd79a2859001c99))
1711

1812
### Bug Fixes:
1913

14+
- Fixed the backup System. - ([d023d03](https://github.com/DroidWorksStudio/EasyLauncher/commit/d023d03428ba2ccb5b3ba637e7c8a794a7641f2c))
2015
- Fixed a few issues with app draw including icons as well as work profile stuff. - ([66065b7](https://github.com/DroidWorksStudio/EasyLauncher/commit/66065b76f8b5dc3673af349570287816ed057fb1))
2116
- First start with filter when filterStrength is set to 0 - ([ff7ecb1](https://github.com/DroidWorksStudio/EasyLauncher/commit/ff7ecb149186645d1990da863afee80b596428f0))
2217
- Fixed the search feature to only show items not hidden. - ([846ba48](https://github.com/DroidWorksStudio/EasyLauncher/commit/846ba486374b988c7f7f6cfd636f3aede8f24701))
@@ -38,6 +33,7 @@ All notable changes to this project will be documented in this file. See [conven
3833

3934
### Releases:
4035

36+
- Prepare for version 0.3.3 - ([c82c05e](https://github.com/DroidWorksStudio/EasyLauncher/commit/c82c05e1c6b33f5936a442f0764482d4cd2d9221))
4137
- Prepare for version 0.3.2 - ([8aebf00](https://github.com/DroidWorksStudio/EasyLauncher/commit/8aebf00cdf14026abc25793ba9f303fce09fe1c2))
4238

4339
## [0.3.1](https://github.com/DroidWorksStudio/EasyLauncher/tree/0.3.1) - (01, December 2024)

app/src/main/java/com/github/droidworksstudio/launcher/helper/AppHelper.kt

+7-1
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,17 @@ class AppHelper @Inject constructor() {
397397
// Deserialize the JSON into a List<AppInfo>
398398
val appInfoList: List<AppInfo> = gson.fromJson(jsonReader, type)
399399

400+
// Modify the list to reset IDs (ignore the original ID)
401+
val resetAppInfoList = appInfoList.mapIndexed { index, appInfo ->
402+
appInfo.copy(id = index) // Assign a new sequential ID starting from 0
403+
}
404+
400405
// Clear all apps first
401406
resetDatabase(dao)
402407

403408
// Reinsert data into the database
404-
dao.restoreAll(appInfoList) // Execute the method
409+
Thread.sleep(500)
410+
dao.restoreAll(resetAppInfoList) // Execute the method
405411
} ?: throw Exception("Failed to open input stream from URI")
406412

407413
} catch (e: JsonSyntaxException) {

0 commit comments

Comments
 (0)