File tree Expand file tree Collapse file tree 2 files changed +9
-32
lines changed
Expand file tree Collapse file tree 2 files changed +9
-32
lines changed Original file line number Diff line number Diff line change @@ -297,35 +297,17 @@ class _ProxySettingsPageState extends State<ProxySettingsPage> {
297297 ],
298298 ],
299299 ),
300- SettingsSection (
301- title: Text ('操作' , style: TextStyle (fontFamily: fontFamily)),
302- tiles: [
303- SettingsTile (
304- title: Text ('' , style: TextStyle (fontFamily: fontFamily)),
305- description: Row (
306- children: [
307- Expanded (
308- child: OutlinedButton .icon (
309- onPressed: testProxy,
310- icon: const Icon (Icons .network_check),
311- label: const Text ('测试' ),
312- ),
313- ),
314- const SizedBox (width: 12 ),
315- Expanded (
316- child: FilledButton .icon (
317- onPressed: saveProxySettings,
318- icon: const Icon (Icons .save),
319- label: const Text ('保存' ),
320- ),
321- ),
322- ],
323- ),
324- ),
325- ],
326- ),
327300 ],
328301 ),
302+ floatingActionButton: FloatingActionButton (
303+ onPressed: () async {
304+ await saveProxySettings ();
305+ if (proxyUrl.isNotEmpty && ProxyUtils .isValidProxyUrl (proxyUrl)) {
306+ await testProxy ();
307+ }
308+ },
309+ child: const Icon (Icons .save),
310+ ),
329311 ),
330312 );
331313 }
Original file line number Diff line number Diff line change @@ -208,11 +208,6 @@ class BangumiHTTP {
208208 final res = await Request ().get (
209209 Api .formatUrl (Api .bangumiAPIDomain + Api .bangumiInfoByID, [id]),
210210 );
211- // 检查响应是否有效(排除错误响应)
212- if (res.data is ! Map <String , dynamic > || res.data['id' ] == null ) {
213- KazumiLogger ().e ('Network: invalid response for bangumi info' , error: res.data);
214- return null ;
215- }
216211 return BangumiItem .fromJson (res.data);
217212 } catch (e) {
218213 KazumiLogger ().e ('Network: resolve bangumi item failed' , error: e);
You can’t perform that action at this time.
0 commit comments