This repository was archived by the owner on Aug 7, 2024. It is now read-only.
Conversation
ElenaVeshtard
commented
May 22, 2022



18 Home work. Figma.
This reverts commit 9a04e30
Owner
|
Нужны рамки! |
krottv
suggested changes
May 23, 2022
| } | ||
| private val viewModelModule: Module | ||
| get() = module { | ||
| viewModel { AlbumsViewModel(get()) } |
| import retrofit2.Retrofit | ||
| import retrofit2.create | ||
|
|
||
| class ITunesRemoteDataSourceRetrofit : MusicApi { |
Owner
There was a problem hiding this comment.
Уже Коле писал для реализации нужен другой интерфейс. Этот должен быть только для retrofit, конечно работает и так, но надо, чтобы было чище.
|
|
||
| fun loadTracks() { | ||
| viewModelScope.launch(Dispatchers.IO) { | ||
| _stateITunes.emit(musicApi.getTracks(1)) |
| return START_NOT_STICKY | ||
| } | ||
|
|
||
| private suspend fun loadDataFake() { |
Owner
There was a problem hiding this comment.
Это надо вынести в отдельный класс
| override fun onCreate() { | ||
| super.onCreate() | ||
|
|
||
| runBlocking { |
| holder.imageAlbum.clipToOutline = true | ||
| holder.imageAlbum.outlineProvider = object : ViewOutlineProvider() { | ||
| override fun getOutline(view: View, outline: Outline) { | ||
| outline.setRoundRect(0, 0, view.width, view.height, 24.0F) |
| val action = | ||
| LibraryMusicFragmentDirections.actionLibraryMusicFragmentToITunesMusicFragment() | ||
| navController.navigate(action) | ||
| navController.saveState() |
| navController.saveState() | ||
| } | ||
|
|
||
| viewModel.loadData() |
| import com.github.krottv.tmstemp.domain.AlbumModel | ||
| import com.github.krottv.tmstemp.domain.TracksModel | ||
|
|
||
| class LibraryMusicFragmentBinder(val fragment: LibraryMusicFragment) { |
Owner
There was a problem hiding this comment.
Два фрагмента с одинаковым кодом.
|
|
||
| var data: List<Tracks> = data | ||
| set(value) { | ||
| field = value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.