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

UI overhaul for setup view #274

Merged
merged 6 commits into from
Apr 10, 2024
Merged

Conversation

sunkup
Copy link
Member

@sunkup sunkup commented Apr 4, 2024

More or less what @devvv4ever created as a Mockup.

What do you think? @ArnyminerZ

image

@sunkup sunkup requested a review from ArnyminerZ April 4, 2024 11:22
@sunkup sunkup linked an issue Apr 4, 2024 that may be closed by this pull request
ArnyminerZ
ArnyminerZ previously approved these changes Apr 8, 2024
Copy link
Member

@ArnyminerZ ArnyminerZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks and works great. The only thing that I'd add, now that we are into it, is displaying a more "user friendly" name when we pick a file.

I have this snippet for example:

String[] projection = {MediaStore.MediaColumns.DISPLAY_NAME};
Cursor metaCursor = cr.query(uri, projection, null, null, null);
if (metaCursor != null) {
    try {
        if (metaCursor.moveToFirst()) {
            fileName = metaCursor.getString(0);
        }
    } finally {
        metaCursor.close();
    }
}

I think it would be much better than directly showing content://...

However, if you think the current implementation is enough, I can work with it 😄

@sunkup
Copy link
Member Author

sunkup commented Apr 9, 2024

Nice idea. I have added it now. I would have liked to compute the filename from the url in the viewmodel, but we'd need to pass context or content resolver which is discouraged. This will become cleaner once we use Kotlin flows and compose state anyways, I guess.

@sunkup sunkup requested a review from ArnyminerZ April 9, 2024 08:34
# Conflicts:
#	app/src/main/java/at/bitfire/icsdroid/ui/views/EnterUrlComposable.kt
Copy link
Member

@ArnyminerZ ArnyminerZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just merged with the main branch, everything seems to work fine.
You can merge if it looks good to you

@sunkup sunkup merged commit 68ed9b1 into dev Apr 10, 2024
7 checks passed
@sunkup sunkup deleted the 14-mockup-ui-overhaul-for-setup-view branch April 10, 2024 11:23
@sunkup sunkup added this to the 2.1.1 milestone Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Mockup] UI overhaul for setup view
2 participants