Skip to content

[ktx] onNeverAskAgain not called #767

@SammyOdenhoven

Description

@SammyOdenhoven

Overview

onNeverAskAgain callback is not called when "Don't ask again" is selected.

Expected

onNeverAskAgain callback is called, so I can show the appropriate UI.

Actual

onNeverAskAgain callback is not called.

Environment

  • Running ktx-sample on API 29 and API 30, using ktx v1.1.3

Investigation

After debugging it, I can see that onNeverAskAgain: WeakReference<Fun>? is null in PermissionRequestViewModel.invoke().
After reading through the closed issues, I came across #735. Wondering if the weakreference could be the issue? If I downgrade the ktx library to 1.0.4, onNeverAskAgain is successfully called.

Reproducible steps

screen-20220315-112550.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions