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

Donation dialog does not show button on standard #371

Merged
merged 13 commits into from
Aug 5, 2024

Conversation

ArnyminerZ
Copy link
Member

@ArnyminerZ ArnyminerZ commented Jul 23, 2024

Purpose

The ose version of ICSx5 shows a donation dialog every once in a while, which does have a correct working donation button, but once you hide it, it doesn't pop up again, and can't be invoked in any other way. If the one in the info activity is pressed, the same is shown both in gplay and standard, which doesn't contain any donation button to comply with Google Play's policy.

This dialog should be the same as the one that pops up automatically in standard.

Short description

The preferences have been migrated to DataStore since otherwise there's no easy way to access them from outside the DonateDialogService for example.

There's a migration function in SubscriptionsModel even though I don't think it's even worth it for what it migrates.

Now in InfoActivity the services (ComposableStartupService) are also initialized. If there's a service with the FLAG_DONATION_DIALOG it's shown instead of the default "text dialog".

Note

If we eventually migrate to Compose Navigation services won't be needed to be initialized twice since there would be only one Activity.

Maybe the migration to DataStore is not mandatory for this fix, but I think it's useful, and may solve any future issues.

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@ArnyminerZ ArnyminerZ added the enhancement New feature or request label Jul 23, 2024
@ArnyminerZ ArnyminerZ self-assigned this Jul 23, 2024
@ArnyminerZ ArnyminerZ linked an issue Jul 23, 2024 that may be closed by this pull request
@ArnyminerZ ArnyminerZ requested a review from sunkup July 24, 2024 05:58
@sunkup sunkup force-pushed the 370-donation-dialog-does-not-show-button-on-standard branch from 7b8a8e7 to d3697e2 Compare July 29, 2024 12:49
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
@sunkup sunkup force-pushed the 370-donation-dialog-does-not-show-button-on-standard branch from d3697e2 to d872f68 Compare July 29, 2024 12:55
Copy link
Member

@sunkup sunkup left a comment

Choose a reason for hiding this comment

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

I guess it's neglegtible right now, since there is not anything else going on in ICSx5 at the moment, but in general it would be better to have a seperate PR for the datastore migration, which then gets merged before the issue PR. and It also makes the review easier -> less potential bugs.

Maybe the migration to DataStore is not mandatory for this fix, but I think it's useful, and may solve any future issues.

I think we should do it without datastore for now and try to keep ICSx5 as compatible with DAVx5 as possible. I saw you proposed it for DAVx5, but until it's actually implemented in DAVx5 could be a long time and we don't know Rickis plans on when to merge ICSx5 or to migrate to Datastore really. There could be reasons to merge ICSx5 first and then we don't want to be forced to implement datastore in DAVx5 first.

It's definetly useful and I saw it used in another app already myself. Would be cool to have it, but yeah maybe later?

EDIT:
Nevermind, Ricki says it's nice to try out here in ICSx5 already and should not cause complications when incorporating into DAVx5 :)

@sunkup sunkup self-requested a review July 30, 2024 12:48
@ArnyminerZ
Copy link
Member Author

Nevermind, Ricki says it's nice to try out here in ICSx5 already and should not cause complications when incorporating into DAVx5 :)

Perfect. In any case, there isn't much stored there, so really shouldn't matter for migration to DAVx5

Copy link
Member

@sunkup sunkup left a comment

Choose a reason for hiding this comment

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

See the comments. Works well 👍

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
@ArnyminerZ ArnyminerZ requested a review from sunkup July 31, 2024 13:14
@ArnyminerZ
Copy link
Member Author

Aaaand now tests are failing

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Copy link
Member

@sunkup sunkup left a comment

Choose a reason for hiding this comment

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

See comments

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
@ArnyminerZ
Copy link
Member Author

Should be ready :)

@ArnyminerZ ArnyminerZ requested a review from sunkup August 1, 2024 18:53
@sunkup
Copy link
Member

sunkup commented Aug 5, 2024

Somethings seems to not work with the CI emulator tests, but the change is little. Looks good :)

@sunkup sunkup merged commit 1470e05 into dev Aug 5, 2024
6 of 7 checks passed
@sunkup sunkup deleted the 370-donation-dialog-does-not-show-button-on-standard branch August 5, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Donation dialog does not show button on standard
2 participants