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

Multi account and SSO #599

Merged
merged 85 commits into from
Dec 14, 2019
Merged

Multi account and SSO #599

merged 85 commits into from
Dec 14, 2019

Conversation

stefan-niedermann
Copy link
Member

@stefan-niedermann stefan-niedermann commented Oct 4, 2019

grafik

Open issues

Caching (ETag, Modified)

  • Move e tag and last modified into account-table in database
  • Clean up old e tag and last modified SharedPreferences in database upgrade process
  • 🚧 Something is wrong with the modified date - all my notes appear as last modified 1970.

Migration

  • In database upgrade process create first account entry in account-table with the existing entry from the SharedPreferences (also copy etag and last modified from SharedPreferences to first account entry)
  • Remove the now no longer needed SharedPreferences for the account settings
  • Make sure that this not yet authenticated account asks smoothly the SSO for permission on first sync
    • Android 9
    • 🚧 Android 8 (to be tested)
    • Android 7
    • 🚧 Android 6 (to be tested)
    • 🚧 Android 5 (to be tested)
    • Android 4
  • Indexes for the table_accounts
  • Foreign key from account_id in table_notes to id in table_accounts does not work yet
  • Remove TrustPreference from PreferencesFragment

Widgets

  • @dan0xii the widgets do currently not store the account id from the note. They will have to, otherwise will switching account break the widgets.
  • Widgets do not switch the active account in the app
  • Note list widget appears to only show one account regardless of which is active in the main app
  • Single note widget says "Note not found" after upgrade

Dark theme

  • The font in the header and the new accounts list in the drawer look ugly and wrong with the dark theme.

Follow-Up issues

  • Move widget configurations from SharedPreferences to database

# Conflicts:
#	app/src/main/java/it/niedermann/owncloud/notes/persistence/LoadNotesListTask.java
# Conflicts:
#	app/src/main/java/it/niedermann/owncloud/notes/android/activity/NotesListViewActivity.java
#	fastlane/metadata/android/en-US/changelogs/49.txt
@stefan-niedermann

This comment has been minimized.

@stefan-niedermann
Copy link
Member Author

Oh, i forgot to mention @dan0xii and @korelstar :

Since we now depend in changes in the files app which have not yet been released (for server headers) you will need to checkout files app on the ssoHeaders-branch and install this on your virtual devices, at least until these changes get merged into master.

@dan0xii

This comment has been minimized.

@stefan-niedermann

This comment has been minimized.

@korelstar
Copy link
Member

Fixed lastmodified and ETag. Seems to work fine with Nextcloud Android App 3.9.0 from store (no dev version required anymore).
But I did not a code review 😉

@stefan-niedermann
Copy link
Member Author

Okay @dan0xii @korelstar

i played around and tested various device configurations and it seems to work as far as i can say.

My proposal is to merge this branch into master and release it then, to get some feedback from the F-Droid community.

What do you think? Any major points left, which should be handled before a merge? Any showstopper from you?

@korelstar
Copy link
Member

I just updated another installation and had an issue with migrating the data: all notes have modified=null in the local database. When I then update a note (local or remote), modified is updated correctly for that note, but all other notes are shown under 1970 and still have modified=null. I have to clear the local app data to enforce a complete resynchronization.

I think this should be fixed before doing a release. Unfortunately, currently I have no time to debug this more. But maybe this happen also to you, when migrating from an old release to the latest version?

@stefan-niedermann

This comment has been minimized.

@korelstar
Copy link
Member

I assume that this is fine. Due to pruneBefore, all notes before that date are reduced to the id. But I have an idea and will provide a commit, soon.

@korelstar
Copy link
Member

Please test again with this change (I assume it was a copy/paste error)

@stefan-niedermann
Copy link
Member Author

Aye, this solves the problem :) great!

@korelstar
Copy link
Member

Then LGTM!

@stefan-niedermann stefan-niedermann marked this pull request as ready for review December 14, 2019 14:02
@stefan-niedermann stefan-niedermann merged commit acaa581 into master Dec 14, 2019
@stefan-niedermann
Copy link
Member Author

So, thank you all very very much, let's continue the polishing in master :)

@stefan-niedermann stefan-niedermann deleted the multi-account branch December 14, 2019 14:04
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.

4 participants