Skip to content

Commit

Permalink
chore: Organize usecases
Browse files Browse the repository at this point in the history
  • Loading branch information
kongwoojin committed Mar 29, 2024
1 parent 6384bbf commit 7d70b64
Show file tree
Hide file tree
Showing 26 changed files with 41 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.kongjak.koreatechboard.ui.article

import androidx.lifecycle.viewModelScope
import com.kongjak.koreatechboard.domain.base.ResponseResult
import com.kongjak.koreatechboard.domain.usecase.GetArticleUseCase
import com.kongjak.koreatechboard.domain.usecase.api.GetArticleUseCase
import com.kongjak.koreatechboard.ui.base.BaseViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.launch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.kongjak.koreatechboard.ui.main.board

import androidx.lifecycle.viewModelScope
import com.kongjak.koreatechboard.domain.usecase.GetInitDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.GetUserDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.department.GetInitDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.department.GetUserDepartmentUseCase
import com.kongjak.koreatechboard.ui.base.BaseViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.collectLatest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ package com.kongjak.koreatechboard.ui.main.board

import androidx.lifecycle.viewModelScope
import androidx.paging.cachedIn
import com.kongjak.koreatechboard.domain.usecase.GetBoardUseCase
import com.kongjak.koreatechboard.domain.usecase.api.GetBoardUseCase
import com.kongjak.koreatechboard.ui.base.BaseViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import javax.inject.Inject

@HiltViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.kongjak.koreatechboard.ui.main.home

import androidx.lifecycle.viewModelScope
import com.kongjak.koreatechboard.domain.base.ResponseResult
import com.kongjak.koreatechboard.domain.usecase.GetBoardMinimumUseCase
import com.kongjak.koreatechboard.domain.usecase.api.GetBoardMinimumUseCase
import com.kongjak.koreatechboard.ui.base.BaseViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.launch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.kongjak.koreatechboard.domain.usecase.GetUserDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.department.GetUserDepartmentUseCase
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import com.google.firebase.ktx.Firebase
import com.google.firebase.messaging.ktx.messaging
import com.kongjak.koreatechboard.constraint.FCM_TOPIC_DORM
import com.kongjak.koreatechboard.constraint.FCM_TOPIC_SCHOOL
import com.kongjak.koreatechboard.domain.usecase.GetDarkThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.GetDepartmentNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.GetDormNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.GetDynamicThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.GetInitDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.GetSchoolNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.GetUserDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.SetDarkThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.SetDepartmentNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.SetDormNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.SetDynamicThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.SetInitDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.SetSchoolNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.SetUserDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.theme.GetDarkThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.subscribe.GetDepartmentNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.settings.subscribe.GetDormNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.settings.theme.GetDynamicThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.department.GetInitDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.subscribe.GetSchoolNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.settings.department.GetUserDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.theme.SetDarkThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.subscribe.SetDepartmentNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.settings.subscribe.SetDormNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.settings.theme.SetDynamicThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.department.SetInitDepartmentUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.subscribe.SetSchoolNoticeSubscribe
import com.kongjak.koreatechboard.domain.usecase.settings.department.SetUserDepartmentUseCase
import com.kongjak.koreatechboard.ui.base.BaseViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.collectLatest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.kongjak.koreatechboard.ui.search

import androidx.lifecycle.viewModelScope
import androidx.paging.cachedIn
import com.kongjak.koreatechboard.domain.usecase.SearchBoardWithTitleUseCase
import com.kongjak.koreatechboard.domain.usecase.api.SearchBoardWithTitleUseCase
import com.kongjak.koreatechboard.ui.base.BaseViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import androidx.lifecycle.viewModelScope
import com.kongjak.koreatechboard.domain.DARK_THEME_DARK_THEME
import com.kongjak.koreatechboard.domain.DARK_THEME_LIGHT_THEME
import com.kongjak.koreatechboard.domain.DARK_THEME_SYSTEM_DEFAULT
import com.kongjak.koreatechboard.domain.usecase.GetDarkThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.GetDynamicThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.theme.GetDarkThemeUseCase
import com.kongjak.koreatechboard.domain.usecase.settings.theme.GetDynamicThemeUseCase
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.api

import com.kongjak.koreatechboard.domain.base.ResponseResult
import com.kongjak.koreatechboard.domain.model.Article
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.api

import com.kongjak.koreatechboard.domain.base.ResponseResult
import com.kongjak.koreatechboard.domain.model.Board
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.api

import androidx.paging.PagingData
import com.kongjak.koreatechboard.domain.model.BoardData
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.api

import androidx.paging.PagingData
import com.kongjak.koreatechboard.domain.model.BoardData
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.department

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import kotlinx.coroutines.flow.Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.department

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import kotlinx.coroutines.flow.Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.department

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.department

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.subscribe

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import kotlinx.coroutines.flow.Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.subscribe

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import kotlinx.coroutines.flow.Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.subscribe

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import kotlinx.coroutines.flow.Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.subscribe

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.subscribe

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.subscribe

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.theme

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import kotlinx.coroutines.flow.Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.theme

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import kotlinx.coroutines.flow.Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.theme

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kongjak.koreatechboard.domain.usecase
package com.kongjak.koreatechboard.domain.usecase.settings.theme

import com.kongjak.koreatechboard.domain.repository.SettingsRepository
import javax.inject.Inject
Expand Down

0 comments on commit 7d70b64

Please sign in to comment.