Commit 68ce9cb9aefac15506afabf9b22a67938c70b39e

Authored by 权海
1 parent b2e1c9d6

Revert "feat(ui):增加首页通知权限请求"

This reverts commit b2e1c9d6.
@@ -140,8 +140,6 @@ class TodayController extends GetMaterialController { @@ -140,8 +140,6 @@ class TodayController extends GetMaterialController {
140 'enter_doublefeel_today_status', 140 'enter_doublefeel_today_status',
141 properties: {'user_role': isFriend ? '好友的' : '我的'}, 141 properties: {'user_role': isFriend ? '好友的' : '我的'},
142 ); 142 );
143 - // 如果没有通知权限, 这里请求一下权限  
144 - _requestNotificationAuthorizationIfNeeded();  
145 } 143 }
146 144
147 @override 145 @override
@@ -186,31 +184,6 @@ class TodayController extends GetMaterialController { @@ -186,31 +184,6 @@ class TodayController extends GetMaterialController {
186 }); 184 });
187 } 185 }
188 186
189 - Future<void> _requestNotificationAuthorizationIfNeeded() async {  
190 - try {  
191 - final status = await Permission.notification.status;  
192 -  
193 - if (status.isGranted) {  
194 - // 已授权,无需再请求  
195 - return;  
196 - }  
197 -  
198 - if (status.isPermanentlyDenied) {  
199 - // 用户永久拒绝(Android),引导去设置  
200 - await openAppSettings();  
201 - return;  
202 - }  
203 -  
204 - // 未决定 → 弹出系统授权弹窗  
205 - final result = await Permission.notification.request();  
206 - AppLogger.d(result.isGranted  
207 - ? 'Notification authorization granted'  
208 - : 'Notification authorization skipped');  
209 - } catch (error) {  
210 - AppLogger.e('Notification authorization failed: $error');  
211 - }  
212 - }  
213 -  
214 Future<void> checkHrvAdBannerVisible() async { 187 Future<void> checkHrvAdBannerVisible() async {
215 if (isFriend) { 188 if (isFriend) {
216 showHrvAdBanner.value = false; 189 showHrvAdBanner.value = false;