Open shubertm opened 1 year ago
I'm getting this crash right now:
Caused by: kotlin.UninitializedPropertyAccessException: lateinit property instance has not been initialized
at space.taran.arkfilepicker.folders.FoldersRepo$Companion.getInstance(FoldersRepo.kt:249)
at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerViewModel.<init>(ArkFilePickerViewModel.kt:46)
at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerViewModelFactory.create(ArkFilePickerViewModel.kt:150)
at androidx.lifecycle.ViewModelProvider$Factory.create(ViewModelProvider.kt:83)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153)
at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:53)
at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:35)
at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerFragment.getViewModel(ArkFilePickerFragment.kt:74)
at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerFragment.getPages(ArkFilePickerFragment.kt:287)
at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerFragment.initUI(ArkFilePickerFragment.kt:126)
at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerFragment.onViewCreated(ArkFilePickerFragment.kt:89)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3128)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:552)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1899)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1823)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1760)
at androidx.fragment.app.FragmentController.execPendingActions(FragmentController.java:495)
at androidx.fragment.app.FragmentActivity.onResume(FragmentActivity.java:312)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1488)
at android.app.Activity.performResume(Activity.java:8197)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4814)
... 13 more
I'm getting this crash right now:
Caused by: kotlin.UninitializedPropertyAccessException: lateinit property instance has not been initialized at space.taran.arkfilepicker.folders.FoldersRepo$Companion.getInstance(FoldersRepo.kt:249) at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerViewModel.<init>(ArkFilePickerViewModel.kt:46) at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerViewModelFactory.create(ArkFilePickerViewModel.kt:150) at androidx.lifecycle.ViewModelProvider$Factory.create(ViewModelProvider.kt:83) at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187) at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153) at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:53) at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:35) at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerFragment.getViewModel(ArkFilePickerFragment.kt:74) at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerFragment.getPages(ArkFilePickerFragment.kt:287) at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerFragment.initUI(ArkFilePickerFragment.kt:126) at space.taran.arkfilepicker.presentation.filepicker.ArkFilePickerFragment.onViewCreated(ArkFilePickerFragment.kt:89) at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3128) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:552) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1899) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1823) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1760) at androidx.fragment.app.FragmentController.execPendingActions(FragmentController.java:495) at androidx.fragment.app.FragmentActivity.onResume(FragmentActivity.java:312) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1488) at android.app.Activity.performResume(Activity.java:8197) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4814) ... 13 more
This crash happens because filepicker changed, we have to initialise FoldersRepo during app creation.
We should merge #18 first.
@ShubertMunthali we need to resolve conflicts before merging.
@ShubertMunthali sorry, we need update it again
@ShubertMunthali we need to resolve conflicts before merging.
Cool, I will resolve them
@ShubertMunthali sorry, we need update it again
Yes, I will update it
It works! I've checked both text notes and graphic notes. Versions are displayed correctly and forking functions correctly, too. This is really cool.
We have new reusable storage primitives in arklib-android, let's use them to reduce amount of code. See FileStorage arklib-android.
I think, it's possible to implement VersionStorage
similarly to ScoreStorage. Scores storage is id-to-integer mapping, and versions storage is id-to-id. The code will be very similar to the scores storage.
Also, we should find another icon for forking feature, I'll ask our UX team.
You are right @kirillt
I think it will be efficient to just extract VeraionStorage
to arklib-android
now
I see that we may need it in Retouch soon
@ShubertMunthali it's OK to keep VersionStorage
in this repo for the moment. More important is to derive it from ready-made base classes.
But yes, we'll move it eventually to arklib-android
.
Alright @kirillt, so let's make important storage API from arklib-android
public, I think we can make it internal after all storages are moved there
@ShubertMunthali yes, if our ready-made primitives can't be used to implement custom storages — this should be fixed. Because it would be great if 3rd party developers could write their own storages for their apps.
It's possible to compile arklib-android and inject the local version into the app. It would be easier for experimentation.
Re-implementation of https://github.com/ARK-Builders/ARK-Memo/pull/12
11
10
8
16