Drawer now has a viewModel for each clickable function
This commit is contained in:
		
							parent
							
								
									cee42e7758
								
							
						
					
					
						commit
						4e9aab73c2
					
				
					 1 changed files with 18 additions and 2 deletions
				
			
		|  | @ -8,7 +8,7 @@ import dagger.hilt.android.lifecycle.HiltViewModel | ||||||
| import javax.inject.Inject | import javax.inject.Inject | ||||||
| 
 | 
 | ||||||
| @HiltViewModel | @HiltViewModel | ||||||
| class PrimaryScreenViewModel @Inject constructor( | class DrawerViewModel @Inject constructor( | ||||||
|     private val accountDAO: AccountDAO, |     private val accountDAO: AccountDAO, | ||||||
|     logService: LogService |     logService: LogService | ||||||
| ) : StudeezViewModel(logService) { | ) : StudeezViewModel(logService) { | ||||||
|  | @ -19,4 +19,20 @@ class PrimaryScreenViewModel @Inject constructor( | ||||||
|             openAndPopup(StudeezDestinations.LOGIN_SCREEN, StudeezDestinations.HOME_SCREEN) |             openAndPopup(StudeezDestinations.LOGIN_SCREEN, StudeezDestinations.HOME_SCREEN) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     fun onHomeButtonClick(openAndPopup: (String, String) -> Unit) { | ||||||
|  |         // TODO | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     fun onTimersClick(openAndPopup: (String, String) -> Unit) { | ||||||
|  |         // TODO | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     fun onSettingsClick(openAndPopup: (String, String) -> Unit) { | ||||||
|  |         // TODO | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     fun onAboutClick(openAndPopup: (String, String) -> Unit) { | ||||||
|  |         // TODO | ||||||
|  |     } | ||||||
| } | } | ||||||
		Reference in a new issue
	
	 lbarraga
						lbarraga