Skip to content

fix: skip camera permission if disable instant camera is true - #108

Closed
waifucon wants to merge 1 commit into
NextAlone:mainfrom
waifucon:fix-camera-permission
Closed

waifucon wants to merge 1 commit into
NextAlone:mainfrom
waifucon:fix-camera-permission

Conversation

@waifucon

@waifucon waifucon commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Description

Hi, It is annoying for the user, if the user have Disable Instant Camera enabled, and it asks the user to grant camera permission for just opening the gallery.

This is merged in Nullgram: qwq233/Nullgram#394

Check List

  • I have tested the changes and verified that they work and don't break anything(as well as I can manage) or drop the support for previous versions.
  • My code follows the code style of this project
  • I have merged commits that are meaningless for follow-up work and confirmed that they will not cause damage to follow-up maintenance

@NextAlone NextAlone closed this in 161ffed Oct 1, 2026
@NextAlone

Copy link
Copy Markdown
Owner

Merged into main as 161ffed. Thanks!

The implementation differs slightly from this PR: instead of forcing the request argument of checkCamera to false at the two call sites, only the requestPermissions branch inside checkCamera is gated with !Config.disableInstantCamera. With request=false, users who already granted the camera permission but have no cameraCache yet would also skip initCamera; gating just the prompt keeps that path unchanged.

@waifucon
waifucon deleted the fix-camera-permission branch October 1, 2026 19:21
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.

2 participants