-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Adds option to exclude file/folder patterns #224
base: master
Are you sure you want to change the base?
Conversation
On a first glance, this looks promising. My intuition says that i would like to use a different table with each row only containing the value, possibly the options for that filter. And the task contains a list of the id's for the filters. My thinking is that this could allow later reuse of filters, global filters, etc. Would this allow us to silmultaneous implement include/exclude/filter? Regardless of above ideas, i would prefer to not use a textfield, but a recyclerview with each filter it's own row, and an add-button. This should be way more nice to use, i feel textfields are often a bit clunky to use. |
Okay, i made a decision. I am okay with the current database where you add a field. But i really would like to see a non-textfield-based ui for adding filters. It just is the better UX, and it doesn't require changes to the backend. Though i was reading this page: Rclone Filtering What do you think, could you extend your PR to accomodate this? |
I will look into it. I'll try making the filters a separate database because I agree it will have value to reuse them. I'll add some screenshots soon to explain it better. |
I dont think that is nessessary, or a good idea. As the rclone docs state, it is usually not a good idea to combine includes/excludes, and by only allowing a task-specific option to select wheter or not its an include or exclude, we prevent errors there. It technically limits what you can do with this app, but i think its worthwile to keep the UI not too complicated. It will also limit the complexity of the filter-database. Instead of using multiple rows for a specific filter, we can use a single row with a singe field for the filter, as your current proposal does. |
I am uncertain about the choice of a seperate database for the filters. On one hand, that technically allows more flexibility, but it increases the complexity quite a bit. I currently dont see me using that flexibility, so i think it would be better to keep it contained to the task-database for now. This way we dont need to introduce "massive" changes to the database, that also need to reflect in the model, the import/export and the ui for only theoretical gains. It should also make your work easier. Though if you implement something different, i will certainly review it |
Yes please, that would be a hard requirement. Though, from what i can see you only need to make the FilterEntry serializable, as you did for the Filter itself already, and add that to the Importer/Exporter. Most of the work is done by the serializer, so that is nearly finished already. From your screenshots: It already looks good. There are a few minor things, like the card-on-card* in the filter ui, and a bit of padding here and there, but i will mark them in an in-depth review of the code. *We either need to add the tertiary-card here or use a different element. Maybe we can take something from here: https://m3.material.io/components/lists/specs |
358f1c9
to
3a04afd
Compare
Made some progress, I think it's almost finished.
There was no need to serialize the FilterEntry's because they are already serialized as a string in the class/table. Only the getter/setter actually converts it between a serialized string and a list of FilterEntry's. This is done for ease of use without over complicating the database setup. Please let me know if there's anything else to fix. |
app/src/main/java/ca/pkay/rcloneexplorer/Activities/FilterActivity.kt
Outdated
Show resolved
Hide resolved
super.onCreate(savedInstanceState) | ||
ActivityHelper.applyTheme(this) | ||
setContentView(R.layout.activity_filter) | ||
val toolbar = findViewById<Toolbar>(R.id.toolbar) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a "close" icon in the toolbar would be better instead of the "back"-one that is default. In the future i might change views like this to a Full Screen Dialog
|
||
</androidx.recyclerview.widget.RecyclerView> | ||
|
||
<Button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thus button should be on the right, and it needs a bit more padding from the list above it
android:inputType="text" | ||
android:text="Name" /> | ||
|
||
<ImageButton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a simple trash-button would be more appropriate for a single-menu item
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above, trash-button
@kajgies I think i would like to have the FilterEntry in a seperate table instead of as a string in the filter itself. For one, this allows us to get rid of the string operations in the Are you okay with me changing that? Nice catch with the importer! If you want, i can make the changes myself, including the filter-entry database. In that case, we can just merge this now, and i'll do the rest one by one. |
Hey @newhinton , Thanks for your response. |
Filterentries can be created now within filters Now supports both include and exclude
Removes tertiary cards on filter entry list
Also fixes a bug where triggers would not be linked to a task anymore after importing if you ever deleted a task with a lower ID
8b4feaa
to
f5f92ba
Compare
Rebased it onto master to get the latest version, fix conflicts and make the future merge easier. |
Hello, |
Hi @newhinton, any update on this? I have been using my test build with these changes in it for months and it had been very stable to me so I think it can be merged. What do you think? |
Sorry, i was/am very busy. I will look at it this weekend! |
Adds option to exclude certain file patterns. UI inspired by RClone Browser.
Could fix at least part of this issue 79 and provide a workaround for issue 126
Reason for this request
I use this app to backup all files on my phone, since the Android folder is protected, I am getting errors and this prevents files from being deleted on the remote.
I read the discussion on issue 79 and understand you would rather have some file/folder multi-select option instead for a better user experience. Since that issue is already almost a year ago, I hope you can consider this in the mean time.
Please let me know if I can improve the in-app explanation text or the code.
Screenshot