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

是否可以增加相关配置控制是否需要弹出Toast #2955

Open
Jasonzhou613 opened this issue Nov 21, 2024 · 0 comments
Open

是否可以增加相关配置控制是否需要弹出Toast #2955

Jasonzhou613 opened this issue Nov 21, 2024 · 0 comments

Comments

@Jasonzhou613
Copy link

Current use version?

当前使用的版本是多少?

2.2.3

Will this problem occur in demo?

Demo能否复现这问题?

Describe the problem or provide an error log?

描述问题或提供错误log?

1、第一次打开图库后,多次拒绝权限,并选择“拒绝,不要在询问”
2、点击“去设置”,进入到系统设置页面,然后直接点击返回键,返回到app
3、此时会有一个Toast,是否可以增加相关配置来决定是否需要这个Toast

弹出Toast的代码是在 PictureSelectorFragment 的 handlePermissionSettingResult 方法中

@Override
public void handlePermissionSettingResult(String[] permissions) {
   ...
	if (isHasPermissions) {
	...
	} else {
		if (isHasCamera) {
		    // 这里是否可以增加一个配置,控制 Toast 的显示与否
			ToastUtils.showToast(getContext(), getString(R.string.ps_camera));
		} else {
		    // 这里是否可以增加一个配置,控制 Toast 的显示与否
			ToastUtils.showToast(getContext(), getString(R.string.ps_jurisdiction));
			
			onKeyBackFragmentFinish();
		}
	}
	PermissionConfig.CURRENT_REQUEST_PERMISSION = new String[]{};
}
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

No branches or pull requests

1 participant