Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix: #368 #379

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Fix: #368 #379

merged 1 commit into from
Jul 2, 2024

Conversation

kooWZ
Copy link
Member

@kooWZ kooWZ commented Jul 2, 2024

isFavored and isSubscribed were not updated after request.
Fixes #368.

@kooWZ kooWZ requested a review from w568w July 2, 2024 03:45
@w568w
Copy link
Member

w568w commented Jul 2, 2024

Very strange. We have already change isFavored when pressing the button:

onPressed: () async {
final normalModel = _renderModel as Normal;
if (normalModel.isFavored == null) return;
setState(() => normalModel.isFavored = !normalModel.isFavored!);

How could it be possible that the button does not change its state?

Edit: I got it. We forgot setting isFavored to a non-null value, so it is always null and returns on Line 476. 😅

@w568w w568w merged commit bbce668 into DanXi-Dev:main Jul 2, 2024
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.

[BUG] 收藏订阅按钮失效
2 participants