Add snackbars for missing features
This commit is contained in:
		
							parent
							
								
									e458927c28
								
							
						
					
					
						commit
						5a2632c08a
					
				
					 3 changed files with 17 additions and 8 deletions
				
			
		|  | @ -60,11 +60,9 @@ fun getNavigationBarActions( | |||
|         onAddTaskClick = { | ||||
|             navigationBarViewModel.onAddTaskClick(open) | ||||
|         }, | ||||
| 
 | ||||
|         onAddFriendClick = { | ||||
|             navigationBarViewModel.onAddFriendClick(open) | ||||
|         }, | ||||
| 
 | ||||
|         onAddSessionClick = { | ||||
|             navigationBarViewModel.onAddSessionClick(open) | ||||
|         } | ||||
|  |  | |||
|  | @ -1,17 +1,16 @@ | |||
| package be.ugent.sel.studeez.common.composable.navbar | ||||
| 
 | ||||
| import be.ugent.sel.studeez.common.snackbar.SnackbarManager | ||||
| import be.ugent.sel.studeez.domain.AccountDAO | ||||
| import be.ugent.sel.studeez.domain.LogService | ||||
| import be.ugent.sel.studeez.navigation.StudeezDestinations.CREATE_SESSION_SCREEN | ||||
| import be.ugent.sel.studeez.navigation.StudeezDestinations.CREATE_TASK_SCREEN | ||||
| import be.ugent.sel.studeez.navigation.StudeezDestinations.HOME_SCREEN | ||||
| import be.ugent.sel.studeez.navigation.StudeezDestinations.PROFILE_SCREEN | ||||
| import be.ugent.sel.studeez.navigation.StudeezDestinations.SEARCH_FRIENDS_SCREEN | ||||
| import be.ugent.sel.studeez.navigation.StudeezDestinations.SESSIONS_SCREEN | ||||
| import be.ugent.sel.studeez.navigation.StudeezDestinations.TASKS_SCREEN | ||||
| import be.ugent.sel.studeez.screens.StudeezViewModel | ||||
| import dagger.hilt.android.lifecycle.HiltViewModel | ||||
| import javax.inject.Inject | ||||
| import be.ugent.sel.studeez.R.string as AppText | ||||
| 
 | ||||
| @HiltViewModel | ||||
| class NavigationBarViewModel @Inject constructor( | ||||
|  | @ -36,14 +35,17 @@ class NavigationBarViewModel @Inject constructor( | |||
|     } | ||||
| 
 | ||||
|     fun onAddTaskClick(open: (String) -> Unit) { | ||||
|         open(CREATE_TASK_SCREEN) | ||||
|         // TODO open(CREATE_TASK_SCREEN) | ||||
|         SnackbarManager.showMessage(AppText.create_task_not_possible_yet) // TODO Remove | ||||
|     } | ||||
| 
 | ||||
|     fun onAddFriendClick(open: (String) -> Unit) { | ||||
|         open(SEARCH_FRIENDS_SCREEN) | ||||
|         // TODO open(SEARCH_FRIENDS_SCREEN) | ||||
|         SnackbarManager.showMessage(AppText.add_friend_not_possible_yet) // TODO Remove | ||||
|     } | ||||
| 
 | ||||
|     fun onAddSessionClick(open: (String) -> Unit) { | ||||
|         open(CREATE_SESSION_SCREEN) | ||||
|         // TODO open(CREATE_SESSION_SCREEN) | ||||
|         SnackbarManager.showMessage(AppText.create_session_not_possible_yet) // TODO Remove | ||||
|     } | ||||
| } | ||||
|  | @ -92,5 +92,14 @@ | |||
|     <!-- ========== Friends flow ========== --> | ||||
| 
 | ||||
|     <string name="friends">Friends</string> | ||||
|     <string name="add_friend_not_possible_yet">Adding friends still needs to be implemented. Hang on tight!</string> <!-- TODO Remove this description line once implemented. --> | ||||
| 
 | ||||
|     <!-- ========== Create & edit screens ========== --> | ||||
| 
 | ||||
|     <!-- Task --> | ||||
|     <string name="create_task_not_possible_yet">Creating tasks still needs to be implemented. Hang on tight!</string> <!-- TODO Remove this description line once implemented. --> | ||||
| 
 | ||||
|     <!-- Session --> | ||||
|     <string name="create_session_not_possible_yet">Creating sessions still needs to be implemented. Hang on tight!</string> <!-- TODO Remove this description line once implemented. --> | ||||
| 
 | ||||
| </resources> | ||||
|  |  | |||
		Reference in a new issue