Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Conversation

@AleksandrKalevich
Copy link

No description provided.

container: ViewGroup?,
savedInstanceState: Bundle?
): View {
fragment = SongFragmentBinder(this)
Copy link
Owner

Choose a reason for hiding this comment

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

naming: fragment -> binder

import com.github.krottv.tmstemp.presentation.SongDownloadViewModel

class SongUploadWorker(
private val songDownloadViewModel: SongDownloadViewModel,
Copy link
Owner

Choose a reason for hiding this comment

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

songDownloadViewModel -> smth else

return data.size
}

private fun setRoundRect(imageView: ImageView, dp: Int) {
Copy link
Owner

Choose a reason for hiding this comment

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

вынести в отдельную фуункцию


override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
downloadingJob?.cancel()
downloadingJob = CoroutineScope(SupervisorJob() + Dispatchers.Main).launch {
Copy link
Owner

Choose a reason for hiding this comment

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

scope в отдельную переменную, отменить.

): View {
fragment = HostFragmentBinding.inflate(inflater)

storagePermissionChecker = StoragePermissionCheckerImpl(requireActivity())
Copy link
Owner

Choose a reason for hiding this comment

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

use koin


private lateinit var fragment: HostFragmentBinding
private val sharedPreferences: SharedPreferences by inject()
private val albumsFragment = AlbumsFragment()
Copy link
Owner

Choose a reason for hiding this comment

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

Нельзя тут создавать и хранить фрагменты. findFragmentByTag()

isClickable = false
}

setSecondary(primary)
Copy link
Owner

Choose a reason for hiding this comment

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

Misleading naming

}

companion object {
lateinit var appContext: Context
Copy link
Owner

Choose a reason for hiding this comment

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

Антипаттерн - нельзя контекст хранить

import com.github.krottv.tmstemp.domain.SongModel

interface TracksMyMusicDataSource {
suspend fun getTracks(): List<SongModel>
Copy link
Owner

Choose a reason for hiding this comment

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

Где получение альбомов?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants