Skip to content

Commit

Permalink
fix: Fix user department is fixed as cse
Browse files Browse the repository at this point in the history
  • Loading branch information
kongwoojin committed Apr 6, 2024
1 parent 206018e commit e085323
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ import com.kongjak.koreatechboard.R
import com.kongjak.koreatechboard.ui.article.ArticleActivity
import com.kongjak.koreatechboard.ui.components.dialog.TextFieldDialog
import com.kongjak.koreatechboard.ui.main.settings.deptList
import com.kongjak.koreatechboard.ui.main.settings.fullDeptList
import com.kongjak.koreatechboard.ui.network.NetworkViewModel
import com.kongjak.koreatechboard.ui.search.SearchActivity
import com.kongjak.koreatechboard.ui.theme.boardItemSubText
Expand All @@ -82,17 +81,24 @@ fun BoardScreen(
val uiState by boardInitViewModel.collectAsState()
val initDepartment = uiState.initDepartment
val userDepartment = uiState.userDepartment

val departmentList = listOf(
Department.School,
Department.Dorm,
deptList[userDepartment]
)

BottomSheetScaffold(
defaultDepartment ?: fullDeptList[initDepartment],
userDepartment
defaultDepartment ?: departmentList[initDepartment],
deptList[userDepartment]
)
}

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun BottomSheetScaffold(
initDepartment: Department,
userDepartment: Int
userDepartment: Department
) {
val scaffoldState = rememberBottomSheetScaffoldState()
val scope = rememberCoroutineScope()
Expand All @@ -102,7 +108,7 @@ fun BottomSheetScaffold(
val scaffoldItemList = listOf(
Department.School,
Department.Dorm,
deptList[userDepartment]
userDepartment
)

BottomSheetScaffold(
Expand Down

0 comments on commit e085323

Please sign in to comment.