Skip to content

Conversation

@JaeYoung290
Copy link
Owner

14주차 과제 PR입니다.

Copy link

@skdud0629 skdud0629 left a 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

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 ->

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>()

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

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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

예외처리는 usecase에서 해주세요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants