@@ -66,7 +66,6 @@ import io.github.jisungbin.gitmessengerbot.activity.imageviewer.ImageViewActivit
6666import io.github.jisungbin.gitmessengerbot.common.constant.GithubConstant
6767import io.github.jisungbin.gitmessengerbot.common.constant.IntentConstant
6868import io.github.jisungbin.gitmessengerbot.common.core.Storage
69- import io.github.jisungbin.gitmessengerbot.common.exception.PresentationException
7069import io.github.jisungbin.gitmessengerbot.common.extension.toModel
7170import io.github.jisungbin.gitmessengerbot.domain.github.model.user.GithubData
7271import io.github.jisungbin.gitmessengerbot.theme.colors
@@ -115,9 +114,9 @@ fun Header(searchField: MutableState<TextFieldValue>) {
115114
116115 val app by AppConfig .app.collectAsState()
117116 val backgroundService = Intent (context, BackgroundService ::class .java)
118- val githubJson = Storage .read( GithubConstant . DataPath , null )
119- ? : throw PresentationException ( " GithubConfig.DataPath의 값이 null 이에요. " )
120- val githubData: GithubData = githubJson.toModel()
117+ val githubJson =
118+ Storage .read( GithubConstant . DataPath , null ) // TODO: null 처리 (ScopedStorage 대응해서 )
119+ val githubData: GithubData = githubJson? .toModel() ? : GithubData (userName = " User " )
121120 var searching by remember { mutableStateOf(false ) }
122121
123122 ConstraintLayout (
@@ -208,6 +207,7 @@ fun Header(searchField: MutableState<TextFieldValue>) {
208207 style = TextStyle (fontFamily = defaultFontFamily, fontSize = 15 .sp)
209208 )
210209 Switch (
210+ modifier = Modifier .height(20 .dp),
211211 checked = app.power,
212212 colors = SwitchDefaults .colors(
213213 checkedThumbColor = Color .White ,
@@ -240,7 +240,10 @@ fun Header(searchField: MutableState<TextFieldValue>) {
240240 text = Bot .getAllScripts().size.toString(),
241241 style = TextStyle (fontFamily = defaultFontFamily, fontSize = 25 .sp)
242242 )
243- Text (text = " 개" , style = TextStyle (fontFamily = defaultFontFamily, fontSize = 15 .sp))
243+ Text (
244+ text = " 개" ,
245+ style = TextStyle (fontFamily = defaultFontFamily, fontSize = 15 .sp)
246+ )
244247 }
245248 }
246249 MenuBox (
@@ -255,7 +258,10 @@ fun Header(searchField: MutableState<TextFieldValue>) {
255258 text = Bot .getRunnableScripts().size.toString(),
256259 style = TextStyle (fontFamily = defaultFontFamily, fontSize = 25 .sp)
257260 )
258- Text (text = " 개" , style = TextStyle (fontFamily = defaultFontFamily, fontSize = 15 .sp))
261+ Text (
262+ text = " 개" ,
263+ style = TextStyle (fontFamily = defaultFontFamily, fontSize = 15 .sp)
264+ )
259265 }
260266 }
261267 MenuBox (
0 commit comments