Rukkaitto / mobichan

A 4chan app made with Flutter.
Apache License 2.0
41 stars 6 forks source link

Thumbnail crop setting #122

Closed mitchross closed 1 year ago

mitchross commented 2 years ago

Upgrade various pubspec dependencies Center Crop Image so the image is not zoomed in.

Rukkaitto commented 2 years ago

Build errors can be solved with this : https://github.com/flutter/flutter/issues/110835#issuecomment-1235264618

mitchross commented 2 years ago

Build errors can be solved with this : flutter/flutter#110835 (comment)

Good to hear from you! I'll take care of these. Please pull down this change to see if you are ok with the center crop image.

Rukkaitto commented 2 years ago

Build errors can be solved with this : flutter/flutter#110835 (comment)

Good to hear from you! I'll take care of these. Please pull down this change to see if you are ok with the center crop image.

Honestly not a big fan of the center crop, especially on tall images (personal preference, so could be a setting?) Thanks for contributing though, will probably release a new minor version after this PR!

mitchross commented 2 years ago

Build errors can be solved with this : flutter/flutter#110835 (comment)

Good to hear from you! I'll take care of these. Please pull down this change to see if you are ok with the center crop image.

Honestly not a big fan of the center crop, especially on tall images (personal preference, so could be a setting?) Thanks for contributing though, will probably release a new minor version after this PR!

Yea i'll do a preference. Any idea how to pass that preference down to ImageWidgetBuilders?

Rukkaitto commented 2 years ago

Build errors can be solved with this : flutter/flutter#110835 (comment)

Good to hear from you! I'll take care of these. Please pull down this change to see if you are ok with the center crop image.

Honestly not a big fan of the center crop, especially on tall images (personal preference, so could be a setting?) Thanks for contributing though, will probably release a new minor version after this PR!

Yea i'll do a preference. Any idea how to pass that preference down to ImageWidgetBuilders?

Simply use the SettingProvider widget.

mitchross commented 2 years ago

Build errors can be solved with this : flutter/flutter#110835 (comment)

Good to hear from you! I'll take care of these. Please pull down this change to see if you are ok with the center crop image.

Honestly not a big fan of the center crop, especially on tall images (personal preference, so could be a setting?) Thanks for contributing though, will probably release a new minor version after this PR!

Yea i'll do a preference. Any idea how to pass that preference down to ImageWidgetBuilders?

Simply use the SettingProvider widget.

Alright, moved to setting. Updated the gradle. Should be good for re-review

Rukkaitto commented 2 years ago

@mitchross There's an issue with the kotlin_version specified in install_plugin's build.gradle file, which is from your fork of the plugin

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.40 and higher.
The following dependencies do not satisfy the required version:
project ':install_plugin' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20
mitchross commented 2 years ago

@mitchross There's an issue with the kotlin_version specified in install_plugin's build.gradle file, which is from your fork of the plugin

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.40 and higher.
The following dependencies do not satisfy the required version:
project ':install_plugin' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20

ahh good catch let me fix that

mitchross commented 2 years ago

@Rukkaitto

Should be updated on the fork now.

lgoudin commented 2 years ago

When toggling the setting, the UI doesn't update right away (like the grid view toggle for example)

mitchross commented 2 years ago

When toggling the setting, the UI doesn't update right away (like the grid view toggle for example)

Yea it's due to the cache image controller. ( means cache is working 😀 ). If you scroll down a bit and up the images update crop ratio as the cache gets cleared once you scroll far enough down.

lgoudin commented 2 years ago

When toggling the setting, the UI doesn't update right away (like the grid view toggle for example)

Yea it's due to the cache image controller. ( means cache is working 😀 ). If you scroll down a bit and up the images update crop ratio as the cache gets cleared once you scroll far enough down.

Not great from a UX perspective in my opinion, maybe there's a way to force an update?

mitchross commented 2 years ago

When toggling the setting, the UI doesn't update right away (like the grid view toggle for example)

Yea it's due to the cache image controller. ( means cache is working 😀 ). If you scroll down a bit and up the images update crop ratio as the cache gets cleared once you scroll far enough down.

Not great from a UX perspective in my opinion, maybe there's a way to force an update?

I took another look. I think I have a way to get the screen to refresh after setting change, however I need you help.

Do you know why settings is always Null here?

image

lgoudin commented 1 year ago

When toggling the setting, the UI doesn't update right away (like the grid view toggle for example)

Yea it's due to the cache image controller. ( means cache is working 😀 ). If you scroll down a bit and up the images update crop ratio as the cache gets cleared once you scroll far enough down.

Not great from a UX perspective in my opinion, maybe there's a way to force an update?

I took another look. I think I have a way to get the screen to refresh after setting change, however I need you help.

Do you know why settings is always Null here?

image

The settings object is null initially, you should probably check if it's null before returning the FutureBuilder widget.