mirror of
https://github.com/zoriya/flood.git
synced 2026-06-01 10:35:59 +00:00
client: unconditionally remember user's deleteData preference
This commit is contained in:
@@ -103,7 +103,6 @@ const TorrentActions = {
|
||||
data: {
|
||||
data,
|
||||
count: options.hashes.length,
|
||||
deleteData: options.deleteData || false,
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
@@ -85,6 +85,8 @@ class RemoveTorrentsModal extends React.Component<WrappedComponentProps> {
|
||||
hashes: TorrentStore.getSelectedTorrents(),
|
||||
deleteData,
|
||||
});
|
||||
|
||||
SettingsStore.setFloodSetting('deleteTorrentData', deleteData);
|
||||
};
|
||||
|
||||
render() {
|
||||
|
||||
@@ -244,7 +244,7 @@ interface ClientMoveTorrentsErrorAction {
|
||||
|
||||
interface ClientRemoveTorrentSuccessAction {
|
||||
type: 'CLIENT_REMOVE_TORRENT_SUCCESS';
|
||||
data: {count: number; deleteData: boolean};
|
||||
data: {count: number};
|
||||
}
|
||||
|
||||
interface ClientRemoveTorrentErrorAction {
|
||||
|
||||
@@ -184,9 +184,7 @@ class TorrentStoreClass extends BaseStore {
|
||||
});
|
||||
}
|
||||
|
||||
static handleRemoveTorrentsSuccess(response: {count: number; deleteData: boolean}) {
|
||||
SettingsStore.setFloodSetting('deleteTorrentData', response.deleteData);
|
||||
|
||||
static handleRemoveTorrentsSuccess(response: {count: number}) {
|
||||
AlertStore.add({
|
||||
accumulation: {
|
||||
id: 'alert.torrent.remove',
|
||||
|
||||
Reference in New Issue
Block a user