@@ -88,6 +88,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
88
88
// *User Interface
89
89
Map <String , bool > torrentInfo = {};
90
90
Map <String , bool > contextMenuInfo = {};
91
+ TagPreferenceButtonValue tagPreferenceButtonValue =
92
+ TagPreferenceButtonValue .multiSelection;
91
93
92
94
@override
93
95
void didChangeDependencies () {
@@ -152,6 +154,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
152
154
// *User Interface Initialization
153
155
final AppLocalizations l10n = context.l10n;
154
156
torrentInfo = {
157
+ l10n.show_progress_bar_option: userInterfaceModel.showProgressBar,
155
158
l10n.torrent_description_date_added: userInterfaceModel.showDateAdded,
156
159
l10n.torrent_description_date_created:
157
160
userInterfaceModel.showDateCreated,
@@ -186,6 +189,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
186
189
userInterfaceModel.showSequentialDownload,
187
190
l10n.torrents_download_torrent: userInterfaceModel.showDownloadTorrent,
188
191
};
192
+
193
+ tagPreferenceButtonValue = userInterfaceModel.tagPreferenceButtonValue;
189
194
});
190
195
super .didChangeDependencies ();
191
196
}
@@ -200,43 +205,53 @@ class _SettingsScreenState extends State<SettingsScreen> {
200
205
elevation: 0 ,
201
206
backgroundColor: ThemeBloc .theme (widget.themeIndex).primaryColorDark,
202
207
onPressed: () {
203
- BlocProvider .of <UserInterfaceBloc >(context, listen: false )
204
- . add ( UpdateUserInterfaceEvent (
208
+ BlocProvider .of <UserInterfaceBloc >(context, listen: false ). add (
209
+ UpdateUserInterfaceEvent (
205
210
model: UserInterfaceModel (
206
- showDateAdded: torrentInfo[l10n.torrent_description_date_added]! ,
207
- showDateCreated:
208
- torrentInfo[l10n.torrent_description_date_created]! ,
209
- showRatio: torrentInfo[l10n.torrent_description_ratio]! ,
210
- showLocation: torrentInfo[l10n.torrent_description_location]! ,
211
- showTags: torrentInfo[l10n.torrents_add_tags]! ,
212
- showTrackers: torrentInfo[l10n.torrent_description_trackers]! ,
213
- showTrackersMessage:
214
- torrentInfo[l10n.torrent_description_trackers_message]! ,
215
- showDownloadSpeed:
216
- torrentInfo[l10n.torrent_description_download_speed]! ,
217
- showUploadSpeed:
218
- torrentInfo[l10n.torrent_description_upload_speed]! ,
219
- showPeers: torrentInfo[l10n.torrent_description_peers]! ,
220
- showSeeds: torrentInfo[l10n.torrent_description_seeds]! ,
221
- showSize: torrentInfo[l10n.torrent_description_size]! ,
222
- showType: torrentInfo[l10n.torrent_description_type]! ,
223
- showHash: torrentInfo[l10n.torrent_description_hash]! ,
224
- showDelete: contextMenuInfo[l10n.multi_torrents_actions_delete]! ,
225
- showSetTags: contextMenuInfo[l10n.torrents_set_tags_heading]! ,
226
- showCheckHash: contextMenuInfo[l10n.torrent_check_hash]! ,
227
- showReannounce: contextMenuInfo[l10n.torrents_reannounce]! ,
228
- showSetTrackers:
229
- contextMenuInfo[l10n.torrents_set_trackers_heading]! ,
230
- showGenerateMagnetLink:
231
- contextMenuInfo[l10n.torrents_genrate_magnet_link]! ,
232
- showPriority: contextMenuInfo[l10n.set_priority_heading]! ,
233
- showInitialSeeding:
234
- contextMenuInfo[l10n.torrents_initial_seeding]! ,
235
- showSequentialDownload:
236
- contextMenuInfo[l10n.torrents_sequential_download]! ,
237
- showDownloadTorrent:
238
- contextMenuInfo[l10n.torrents_download_torrent]! ,
239
- )));
211
+ showProgressBar:
212
+ torrentInfo[l10n.show_progress_bar_option]! ,
213
+ showDateAdded:
214
+ torrentInfo[l10n.torrent_description_date_added]! ,
215
+ showDateCreated:
216
+ torrentInfo[l10n.torrent_description_date_created]! ,
217
+ showRatio: torrentInfo[l10n.torrent_description_ratio]! ,
218
+ showLocation:
219
+ torrentInfo[l10n.torrent_description_location]! ,
220
+ showTags: torrentInfo[l10n.torrents_add_tags]! ,
221
+ showTrackers:
222
+ torrentInfo[l10n.torrent_description_trackers]! ,
223
+ showTrackersMessage: torrentInfo[
224
+ l10n.torrent_description_trackers_message]! ,
225
+ showDownloadSpeed: torrentInfo[
226
+ l10n.torrent_description_download_speed]! ,
227
+ showUploadSpeed:
228
+ torrentInfo[l10n.torrent_description_upload_speed]! ,
229
+ showPeers: torrentInfo[l10n.torrent_description_peers]! ,
230
+ showSeeds: torrentInfo[l10n.torrent_description_seeds]! ,
231
+ showSize: torrentInfo[l10n.torrent_description_size]! ,
232
+ showType: torrentInfo[l10n.torrent_description_type]! ,
233
+ showHash: torrentInfo[l10n.torrent_description_hash]! ,
234
+ showDelete: contextMenuInfo[
235
+ l10n.multi_torrents_actions_delete]! ,
236
+ showSetTags:
237
+ contextMenuInfo[l10n.torrents_set_tags_heading]! ,
238
+ showCheckHash:
239
+ contextMenuInfo[l10n.torrent_check_hash]! ,
240
+ showReannounce:
241
+ contextMenuInfo[l10n.torrents_reannounce]! ,
242
+ showSetTrackers: contextMenuInfo[
243
+ l10n.torrents_set_trackers_heading]! ,
244
+ showGenerateMagnetLink:
245
+ contextMenuInfo[l10n.torrents_genrate_magnet_link]! ,
246
+ showPriority:
247
+ contextMenuInfo[l10n.set_priority_heading]! ,
248
+ showInitialSeeding:
249
+ contextMenuInfo[l10n.torrents_initial_seeding]! ,
250
+ showSequentialDownload:
251
+ contextMenuInfo[l10n.torrents_sequential_download]! ,
252
+ showDownloadTorrent:
253
+ contextMenuInfo[l10n.torrents_download_torrent]! ,
254
+ tagPreferenceButtonValue: tagPreferenceButtonValue)));
240
255
241
256
ClientSettingsModel clientSettingsModel =
242
257
BlocProvider .of <ClientSettingsBloc >(context).clientSettings;
@@ -428,6 +443,12 @@ class _SettingsScreenState extends State<SettingsScreen> {
428
443
hp: hp,
429
444
torrentScreenItems: torrentInfo,
430
445
contextMenuItems: contextMenuInfo,
446
+ selectedRadioButton: tagPreferenceButtonValue,
447
+ tagSelectionOnChange: (value) {
448
+ setState (() {
449
+ tagPreferenceButtonValue = value! ;
450
+ });
451
+ },
431
452
),
432
453
// *Power Management Section
433
454
PowerManagementSection (
0 commit comments