bitfireAT / icsx5

ICSx⁵ is an Android app to subscribe to remote or local iCalendar files (like time tables of your school/university or event files of your sports team).
https://icsx5.bitfire.at
GNU General Public License v3.0
164 stars 8 forks source link

Donation dialog does not show button on standard #371

Closed ArnyminerZ closed 1 month ago

ArnyminerZ commented 1 month ago

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

ArnyminerZ commented 1 month ago

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

ArnyminerZ commented 1 month ago

Aaaand now tests are failing

ArnyminerZ commented 1 month ago

Should be ready :)

sunkup commented 1 month ago

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