Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial/Instruction request (data parts selector for Backup/Restore) #909

Open
LucasBS1 opened this issue Sep 26, 2024 · 8 comments
Open
Labels
enhancement New feature or request

Comments

@LucasBS1
Copy link

It's not a bug, but since there is no adequate category...

Very simple, actually:

I made a list of apps using the PUT function.

How do I backup ONLY THE DATA of these apps ?

Right now, I have to backup everything and the delete the .apks

@LucasBS1 LucasBS1 changed the title Tutorial/Inatruction request Tutorial/Instruction request Sep 26, 2024
@machiav3lli
Copy link
Member

It's still not possible.

@hg42 I guess this is a FR for your implementation.

@machiav3lli machiav3lli added the enhancement New feature or request label Sep 28, 2024
@LucasBS1
Copy link
Author

Thank you for addressing this

@hg42
Copy link
Collaborator

hg42 commented Oct 4, 2024

@hg42 I guess this is a FR for your implementation.

yes, it's already somewhere in my head...

I was basically waiting, that I can reuse the dialog from the other parts...
as far as I remember, it wasn't a Composable, yet, not sure if I revisited it later

@hg42 hg42 changed the title Tutorial/Instruction request Tutorial/Instruction request (data parts selector for Get/Put) Oct 4, 2024
@hg42 hg42 changed the title Tutorial/Instruction request (data parts selector for Get/Put) Tutorial/Instruction request (data parts selector for Backup/Restore) Oct 5, 2024
@hg42
Copy link
Collaborator

hg42 commented Oct 5, 2024

yeah, the "openDialogCustom" inflation...

It's not the recommended way. It's recommended to do this with callbacks.

  1. because the Composable must know something about the calling site
  2. it's an output parameter, while Compose is a functional paradigm, so there are no output parameters, even if Kotlin allows it, it's not matching the design (and this could create multithreading problems)

Btw. it's kind of undefined if it's better to use onAction (or similar) and distinguish the cases in the callback (onActions("save", ...) vs. onAction("cancel", ...), or to provide a callback for each situation (e.g. onSave(...) vs. onCancel(...)).
I am not sure, which would be better, but I would want to have the same way in all occasions.

I postponed the use of the dialog until this is fixed somehow, because each usage would make it more work to change it.

Would you accept, if I would rewrite the openDialogCustom thingy to use callbacks? it's distributed all over the source, so there should nothing be going on in parallel.

Though, I don't know when I have spare time to do such a job.

@hg42
Copy link
Collaborator

hg42 commented Oct 7, 2024

there's more to it...

we have different selections:

apk / data / both
apk / data / dedata / ext / obb / media
no_backup
cache

I think these should all have the same selection:
apk / data / dedata / ext / obb / media / no_backup / cache

Backup page is apk / data basically because with user apps you want apk, but with system apps you don't.
For really individual batches you would want all switches.
So either you have all switches on each entry, or you do the selection group wise, which is more convenient.

Such a dialog does not exist, so I guess I need to create my own.
However, this is not sufficient, because no_backup and cache are global options.

@hg42
Copy link
Collaborator

hg42 commented Oct 8, 2024

added, try pumpkin test apk:

https://t.me/neo_backup/53944/59674

it's independent of the other selectors, because it's more consistent this way, was easy enough to implement.
The others also have different circumstances, so they would not fit anyways.

@hg42
Copy link
Collaborator

hg42 commented Oct 8, 2024

will probably be added to next release

@hg42 hg42 closed this as completed Oct 8, 2024
@machiav3lli
Copy link
Member

I was basically waiting, that I can reuse the dialog from the other parts...
as far as I remember, it wasn't a Composable, yet, not sure if I revisited it later

All dialogs are composables since a while (if I'm not mixing projects).

Would you accept, if I would rewrite the openDialogCustom thingy to use callbacks? it's distributed all over the source, so there should nothing be going on in parallel.

You can surely test alternatives, but am not sure if it'll replace current components.

I think these should all have the same selection:
apk / data / dedata / ext / obb / media / no_backup / cache

Not really, all but no_backup & cache are REAL polytomic types, while these two are kinda specific file types acrross these types. Therefore a better differentiation should take place.

@machiav3lli machiav3lli reopened this Oct 9, 2024
@LucasBS1 LucasBS1 mentioned this issue Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants