-
Notifications
You must be signed in to change notification settings - Fork 0
14주차 과제 PR입니다. #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
14주차 과제 PR입니다. #11
Conversation
skdud0629
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!
| private lateinit var binding: ActivityMainBinding | ||
| private lateinit var wordAdapter: WordAdapter | ||
| private val viewModel: WordsViewModel by viewModels() | ||
| private val permission = Manifest.permission.READ_MEDIA_IMAGES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readMediaImagesPermission
더 직관적인 변수명을 사용하는 걸 권장합니당
| private val viewModel: AddEditWordViewModel by viewModels() | ||
| private var selectedImageUri: Uri? = null | ||
|
|
||
| private val imagePickerLauncher = registerForActivityResult(ActivityResultContracts.GetContent()) { uri -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registerForActivityResult 선언은 oncreate에서 해주세요!
| private val _wordMeaning = MutableLiveData("") | ||
| val wordMeaning: LiveData<String> = _wordMeaning | ||
|
|
||
| private val _eventFlow = MutableSharedFlow<UiEvent>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
| import androidx.lifecycle.ViewModel | ||
| import androidx.lifecycle.viewModelScope | ||
| import com.example.assignment.feature_word.domain.model.Word | ||
| import com.example.assignment.feature_word.domain.use_case.WordUseCases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
패키지에 언더바 사용해주지말아주세요
| ) | ||
| ) | ||
| _eventFlow.emit(UiEvent.SaveWord) | ||
| } catch (e: InvalidWordException) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예외처리는 usecase에서 해주세요
14주차 과제 PR입니다.