Skip to content

Commit

Permalink
chore: Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
kongwoojin committed Apr 20, 2024
1 parent bf6ab0a commit bde6fe1
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package com.kongjak.koreatechboard.di

import android.content.Context
import com.kongjak.koreatechboard.data.dao.ArticleDao
import com.kongjak.koreatechboard.data.datasource.local.DatabaseLocalDataSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import com.kongjak.koreatechboard.ui.components.FileText
import com.kongjak.koreatechboard.ui.components.HtmlText
import com.kongjak.koreatechboard.ui.theme.articleSubText
import com.kongjak.koreatechboard.ui.theme.articleTitle
import com.kongjak.koreatechboard.ui.viewmodel.ThemeViewModel
import org.orbitmvi.orbit.compose.collectAsState
import org.orbitmvi.orbit.compose.collectSideEffect
import java.util.UUID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ fun MainScreen(mainViewModel: MainViewModel) {
)
)
KoreatechBoardAppBar(
actionList = actionList,
backAction = {
navController.popBackStack()
}
actionList = actionList
)
},
bottomBar = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,6 @@ val deptList = listOf(
val deptListString = deptList.map { it.stringResource }
val deptListName = deptList.map { it.name }

val fullDeptList = listOf(
Department.School,
Department.Dorm,
Department.Cse,
Department.Mechanical,
Department.Mechatronics,
Department.Ite,
Department.Ide,
Department.Arch,
Department.Mse,
Department.Ace,
Department.Sim
)

val darkTheme = listOf(DARK_THEME_SYSTEM_DEFAULT, DARK_THEME_LIGHT_THEME, DARK_THEME_DARK_THEME)
val darkThemeString = listOf(
R.string.setting_dark_theme_system_default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.selection.selectable
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
Expand All @@ -36,7 +35,6 @@ import com.kongjak.koreatechboard.util.findActivity
import org.orbitmvi.orbit.compose.collectAsState
import org.orbitmvi.orbit.compose.collectSideEffect

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SearchScreen(department: String, board: String, title: String) {
val context = LocalContext.current
Expand Down Expand Up @@ -131,13 +129,13 @@ fun SearchContent(
loadState.refresh is LoadState.Error -> {
val errorMessage =
(loadState.refresh as LoadState.Error).error.localizedMessage
item { BoardError(errorMessage) }
item { BoardError(errorMessage ?: "") }
}

loadState.append is LoadState.Error -> {
val errorMessage =
(loadState.append as LoadState.Error).error.localizedMessage
item { BoardError(errorMessage) }
item { BoardError(errorMessage ?: "") }
}

loadState.refresh is LoadState.NotLoading -> {
Expand Down
29 changes: 0 additions & 29 deletions app/src/main/java/com/kongjak/koreatechboard/ui/theme/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.PlatformTextStyle
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp

// Set of Material typography styles to start with
val Typography = Typography(
bodyLarge = TextStyle(
fontFamily = FontFamily.Default,
Expand All @@ -18,22 +16,6 @@ val Typography = Typography(
lineHeight = 24.sp,
letterSpacing = 0.5.sp
)
/* Other default text styles to override
titleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 22.sp,
lineHeight = 28.sp,
letterSpacing = 0.sp
),
labelSmall = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 11.sp,
lineHeight = 16.sp,
letterSpacing = 0.5.sp
)
*/
)

val Typography.preferenceTitle: TextStyle
Expand Down Expand Up @@ -113,14 +95,3 @@ val Typography.noticeDepartmentText: TextStyle
includeFontPadding = false
)
)

val Typography.noticeItemTitleRead: TextStyle
get() = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Italic,
fontSize = 16.sp,
platformStyle = PlatformTextStyle(
includeFontPadding = false
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ sealed class BoardItem(
object Lecture : BoardItem(R.string.board_lecture_board, R.drawable.ic_bottom_navigation_lecture, "lecture")
object Scholar : BoardItem(R.string.board_scholar_board, R.drawable.ic_bottom_navigation_scholar, "scholar")
object Bachelor : BoardItem(R.string.board_bachelor_board, R.drawable.ic_bottom_navigation_bachelor, "bachelor")
object Covid19 : BoardItem(R.string.board_covid19_board, R.drawable.ic_bottom_navigation_covid, "covid19")
object PDS : BoardItem(R.string.board_pds_board, R.drawable.ic_bottom_navigation_pds, "pds")
}

Expand Down

0 comments on commit bde6fe1

Please sign in to comment.