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 notification crashes caused by unknown notification type #6

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

kyori19
Copy link
Contributor

@kyori19 kyori19 commented Apr 14, 2022

Thanks for developing this elegant app!
I encountered a crash caused by new sign up notifications so I made a quick fix for that.
If you think there's better way to fix this problem, feel free to close this PR.

E/AndroidRuntime: FATAL EXCEPTION: databaseThread
    Process: org.joinmastodon.android, PID: 1642
    java.lang.NullPointerException: Attempt to invoke virtual method 'int org.joinmastodon.android.model.Notification$Type.ordinal()' on a null object reference
        at org.joinmastodon.android.api.CacheController.lambda$putNotifications$9(CacheController.java:200)
        at org.joinmastodon.android.api.CacheController$$ExternalSyntheticLambda5.run(Unknown Source:6)
        at org.joinmastodon.android.api.CacheController.lambda$runOnDbThread$14(CacheController.java:268)
        at org.joinmastodon.android.api.CacheController.$r8$lambda$s8ETJe7YHvU35-CsGtQJHgulQC0(Unknown Source:0)
        at org.joinmastodon.android.api.CacheController$$ExternalSyntheticLambda12.run(Unknown Source:6)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at me.grishka.appkit.utils.WorkerThread.run(WorkerThread.java:54)

@grishka
Copy link
Member

grishka commented Apr 14, 2022

Thanks!

@grishka grishka merged commit 801dc9c into mastodon:master Apr 14, 2022
@kyori19 kyori19 deleted the fix-notification branch April 14, 2022 00:57
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.

None yet

2 participants