Skip to content

Commit

Permalink
Feature(visibility): "DailyClass create button visibility"
Browse files Browse the repository at this point in the history
- Set up visualization of DailyClass FAB button according to opponent's role

related to : dnd-side-project#156
  • Loading branch information
tmdgh1592 committed Feb 24, 2022
1 parent 4d2d17d commit 785f9d7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class CalendarFragment : BaseFragment<FragmentCalendarBinding, CalendarViewModel
val preferenceManager = PreferenceManager(requireContext())
val role = preferenceManager.getInt(SAVED_ROLE_KEY)

if (hostViewModel.generalSubjectDataList.value?.isNullOrEmpty() == true && role == ROLE_STUDENT) {
if (hostViewModel.generalSubjectDataList.value?.isNullOrEmpty() == true || role == ROLE_STUDENT) {
binding.scheduleAddFab.visibility = View.GONE
} else {
binding.scheduleAddFab.visibility = View.VISIBLE
Expand Down

0 comments on commit 785f9d7

Please sign in to comment.