Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

181512365 airtime bonus #477

Merged
merged 28 commits into from
May 18, 2022
Merged

181512365 airtime bonus #477

merged 28 commits into from
May 18, 2022

Conversation

alexosugo
Copy link
Contributor

  • Adds support for promo channels (bonus airtime)
  • Minor UI fixes and improvements.

@alexosugo alexosugo requested a review from androidmaven May 17, 2022 10:42
import kotlinx.coroutines.launch
import timber.log.Timber

class BonusViewModel(val repo: BonusRepo, private val dbRepo: DatabaseRepo) : ViewModel() {
Copy link
Contributor

@androidmaven androidmaven May 17, 2022

Choose a reason for hiding this comment

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

Really like your code style and naming

import kotlinx.coroutines.launch
import timber.log.Timber

class BonusViewModel(val repo: BonusRepo, private val dbRepo: DatabaseRepo) : ViewModel() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Really like your code style.

Comment on lines +80 to 90
fun ImageView.loadImage(fragment: Fragment, url: String) = GlideApp.with(fragment)
.load(url)
.placeholder(R.drawable.icon_bg_circle)
.circleCrop()
.into(imageView)
.override(100)
.into(this)

fun loadImage(context: Context, url: String, imageView: ImageView) = GlideApp.with(context)
fun ImageView.loadImage(context: Context, url: String) = GlideApp.with(context)
.load(url)
.placeholder(R.drawable.icon_bg_circle)
.circleCrop()
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

Comment on lines +80 to 90
fun ImageView.loadImage(fragment: Fragment, url: String) = GlideApp.with(fragment)
.load(url)
.placeholder(R.drawable.icon_bg_circle)
.circleCrop()
.into(imageView)
.override(100)
.into(this)

fun loadImage(context: Context, url: String, imageView: ImageView) = GlideApp.with(context)
fun ImageView.loadImage(context: Context, url: String) = GlideApp.with(context)
.load(url)
.placeholder(R.drawable.icon_bg_circle)
.circleCrop()
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

app:layout_constraintEnd_toStartOf="@id/icon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title"
tools:text="Get 8% bonus when you buy airtime with Stax." />
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor, but maybe to use a string resource.

app:layout_constraintEnd_toStartOf="@id/icon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title"
tools:text="Get 8% bonus when you buy airtime with Stax." />
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor, but maybe to use a string resource.


val hniList = mutableSetOf<String>()
bonusChannels.forEach { channel ->
channel.hniList.split(",").forEach {
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand what this is, but can we split have this in its own function, and use a declarative name so that it's easier to understand what's going on.


val hniList = mutableSetOf<String>()
bonusChannels.forEach { channel ->
channel.hniList.split(",").forEach {
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand what this is, but can we split have this in its own function, and use a declarative name so that it's easier to understand what's going on.

Copy link
Contributor

@androidmaven androidmaven left a comment

Choose a reason for hiding this comment

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

The code looks good. Left a couple of comments. But not a blocker

@alexosugo alexosugo merged commit dd1c819 into development May 18, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants