Skip to content

Add PokePatch feature with Retrofit and Coil integration - #94

Merged
alisen merged 2 commits into
mainfrom
dev/alishen-pokemon
Sep 27, 2025
Merged

alisen merged 2 commits into
mainfrom
dev/alishen-pokemon

Conversation

@alisen

@alisen alisen commented Sep 26, 2025

Copy link
Copy Markdown
Member

No description provided.

@alisen
alisen enabled auto-merge September 26, 2025 20:08

@mariobodemann mariobodemann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very fancy!

I disagree with the build.gradle changes, but otherwise only has few minute things.

Does it come with an embroidery machine to test?

Comment thread converter/build.gradle.kts Outdated
if (!pythonPath.isNullOrBlank()) {
buildPython(pythonPath)
} else {
val osName = System.getProperty("os.name").lowercase()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think that's an assumption we should make here. If the path is not set, assume default installation, otherwise insist on ZE_PATH. Soooooooooo, can we not have the os things?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I did all the changes on windows machine...

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
SingletonImageLoader.setSafe { context ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

😱

And the documentation said, it's not needed if we do nothing special...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll check again there was an error and after this one it was ok

)

interface PokeApi {
@GET("pokemon?limit=20&offset=0")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We probably should set a higher limit. Maybe 1400? Or page through the results, but then we need to expose the offset...

(all the Pokemon!!)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I decreased for faster loading. However, if you like I can adjust to 1400

var mons by remember { mutableStateOf(listOf<Mon>()) }
var mon by remember { mutableStateOf<Mon?>(null) }
var error by remember { mutableStateOf<String?>(null) }
var isLoading by remember { mutableStateOf(false) }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So fancy.

shouldCapture = shouldCapture,
onBitmap = onBitmap,
) {
when {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't get why this is nicer then just a bunch of ifs, but sure.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Kotlin <3

)
}
) {
Text(text = pokemon.name.replaceFirstChar { it.uppercaseChar() })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fancy!!

@alisen
alisen disabled auto-merge September 26, 2025 21:31
…vity initialization, and increase pokemon fetch limit to 1400

@mariobodemann mariobodemann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will this be the last change on this repository?? Maybe!

@alisen

alisen commented Sep 27, 2025

Copy link
Copy Markdown
Member Author

Will this be the last change on this repository?? Maybe!

Who knows, we will see 🙌

@alisen
alisen added this pull request to the merge queue Sep 27, 2025
Merged via the queue into main with commit 46f3690 Sep 27, 2025
1 check passed
@alisen
alisen deleted the dev/alishen-pokemon branch September 27, 2025 11:51
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.

2 participants