-
Notifications
You must be signed in to change notification settings - Fork 7
Homework check #46
base: main
Are you sure you want to change the base?
Homework check #46
Conversation
| container: ViewGroup?, | ||
| savedInstanceState: Bundle? | ||
| ): View { | ||
| fragment = SongFragmentBinder(this) |
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.
naming: fragment -> binder
| import com.github.krottv.tmstemp.presentation.SongDownloadViewModel | ||
|
|
||
| class SongUploadWorker( | ||
| private val songDownloadViewModel: SongDownloadViewModel, |
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.
songDownloadViewModel -> smth else
| return data.size | ||
| } | ||
|
|
||
| private fun setRoundRect(imageView: ImageView, dp: Int) { |
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.
вынести в отдельную фуункцию
|
|
||
| override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { | ||
| downloadingJob?.cancel() | ||
| downloadingJob = CoroutineScope(SupervisorJob() + Dispatchers.Main).launch { |
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.
scope в отдельную переменную, отменить.
| ): View { | ||
| fragment = HostFragmentBinding.inflate(inflater) | ||
|
|
||
| storagePermissionChecker = StoragePermissionCheckerImpl(requireActivity()) |
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.
use koin
|
|
||
| private lateinit var fragment: HostFragmentBinding | ||
| private val sharedPreferences: SharedPreferences by inject() | ||
| private val albumsFragment = AlbumsFragment() |
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.
Нельзя тут создавать и хранить фрагменты. findFragmentByTag()
| isClickable = false | ||
| } | ||
|
|
||
| setSecondary(primary) |
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.
Misleading naming
| } | ||
|
|
||
| companion object { | ||
| lateinit var appContext: Context |
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 com.github.krottv.tmstemp.domain.SongModel | ||
|
|
||
| interface TracksMyMusicDataSource { | ||
| suspend fun getTracks(): List<SongModel> |
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.
Где получение альбомов?
No description provided.