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

dev - FirestoreActions #28

Open
MattS8 opened this issue Nov 28, 2019 · 0 comments
Open

dev - FirestoreActions #28

MattS8 opened this issue Nov 28, 2019 · 0 comments
Assignees
Labels
android Related to android application. under-development

Comments

@MattS8
Copy link
Owner

MattS8 commented Nov 28, 2019

Issue Description:
This issue applies to any code regarding communication to the Firebase Firestore backend. This includes (but not limited to):

  • Fetching/Saving Remote info
  • Fetching/Sacing User info
@MattS8 MattS8 added android Related to android application. under-development labels Nov 28, 2019
@MattS8 MattS8 self-assigned this Nov 28, 2019
MattS8 added a commit that referenced this issue Nov 28, 2019
#17
- Removed unused code from OLD_RemoteFragment ('determineState()', State, etc)
- Creating a button no longer shows a Snackbar notification
- Moved the remoteLayout's onScrollListener to MainActivity as it is now used by multiple fragments

#25
- Added new Permission class. This is is used to determine what permissions the current user has for each remote. It will also allow for remote permissions management in the future.
- Moved 'copyFrom' function from RemoteCreator to RemoteProfile

#27
- Added xml view for an remote item
- Added 'Create first remote' prompt in 'f_remote_all'
- Added new 'tempRemoteName' string to TempData. This is used to store a new name for tempRemoteProfile
- Developed much of 'MyRemotesFragment'. Currently shows a list of all remotes a user has access to and dynamically shows an "edit remote name" button if the user has 'READ_WRITE' permission.
- Added onScrollListener that shows/hides MainViewActivity's UI views (previously unique to OLD_RemoteFragment)

#28
- Added remoteListeners and remotePermissionListeners to FirestoreActions. These keep track of all the listener registrations to each remote and their accompanying permissions
- Moved much of 'listenToRemote()' 's logic to two new listener classes: RemoteListener and RemotePermissionListener. Both of these handle what to do once remote data / remote permission data is received and make the original function cleaner/easier to read. 
- Upon receiving info for a remote, a check is now performed to see if the newly fetched data should be automatically loaded into TempRemoteProfile. This is handy for immediately loading a user's favorite remote upon first load up.
- Added new 'updateRemoteName()' function that allows the user to update only the remote's name. No permission checks are done in this function! It is assume the caller has already done the necessary checks. If not, the backend may deny the change.
- Rearranged the code in 'addRemote()' because I thought it made it easier to read (debatable).
- Added a constant string for the Firestore "remotes" endpoint. In the future I should make all of the main endpoints utilize such a constant.
- Removed old and commented out code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Related to android application. under-development
Projects
None yet
Development

No branches or pull requests

1 participant