mirror of
https://github.com/transmission/transmission
synced 2024-12-21 23:32:35 +00:00
refactor: remove unnecessary NSNotificationCenter observer removals (#5118)
This commit is contained in:
parent
a2b547fb50
commit
2a65169461
12 changed files with 0 additions and 47 deletions
|
@ -106,11 +106,6 @@ typedef NS_ENUM(NSUInteger, PopupPriority) {
|
|||
}
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)setDestination:(id)sender
|
||||
{
|
||||
NSOpenPanel* panel = [NSOpenPanel openPanel];
|
||||
|
|
|
@ -176,8 +176,6 @@ typedef NS_ENUM(NSUInteger, PopupPriority) {
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
|
||||
[_fTimer invalidate];
|
||||
}
|
||||
|
||||
|
|
|
@ -50,11 +50,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)setTorrents:(NSArray<NSString*>*)files
|
||||
{
|
||||
uint64_t size = 0;
|
||||
|
|
|
@ -140,11 +140,6 @@ typedef NS_ENUM(NSInteger, FilterTypeTag) {
|
|||
self.fSearchField.delegate = self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)setFilter:(id)sender
|
||||
{
|
||||
NSString* oldFilterType = [NSUserDefaults.standardUserDefaults stringForKey:@"Filter"];
|
||||
|
|
|
@ -69,11 +69,6 @@ static CGFloat const kStackViewVerticalSpacing = 8.0;
|
|||
[self checkWindowSize];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (CGFloat)fHorizLayoutHeight
|
||||
{
|
||||
return NSHeight(self.fTransferView.frame) + 2 * kStackViewInset;
|
||||
|
|
|
@ -84,11 +84,6 @@ static CGFloat const kStackViewSpacing = 8.0;
|
|||
object:nil];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (CGFloat)fHorizLayoutHeight
|
||||
{
|
||||
return NSHeight(self.fPriorityView.frame) + 2 * kStackViewInset;
|
||||
|
|
|
@ -171,8 +171,6 @@ typedef NS_ENUM(NSUInteger, TabTag) {
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
|
||||
if ([_fViewController respondsToSelector:@selector(saveViewSize)])
|
||||
{
|
||||
[_fViewController saveViewSize];
|
||||
|
|
|
@ -141,7 +141,6 @@ static NSTimeInterval const kUpdateSeconds = 0.75;
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
[_fTimer invalidate];
|
||||
}
|
||||
|
||||
|
|
|
@ -188,8 +188,6 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
|
||||
[_fPortStatusTimer invalidate];
|
||||
if (_fPortChecker)
|
||||
{
|
||||
|
|
|
@ -73,11 +73,6 @@ typedef NS_ENUM(NSUInteger, StatusTag) {
|
|||
object:nil];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)updateWithDownload:(CGFloat)dlRate upload:(CGFloat)ulRate
|
||||
{
|
||||
//set rates
|
||||
|
|
|
@ -168,11 +168,6 @@ bool trashDataFile(char const* filename, void* /*user_data*/, tr_error** error)
|
|||
};
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (NSString*)description
|
||||
{
|
||||
return [@"Torrent: " stringByAppendingString:self.name];
|
||||
|
|
|
@ -112,11 +112,6 @@ static NSTimeInterval const kToggleProgressSeconds = 0.175;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(refreshTorrentTable) name:@"RefreshTorrentTable"
|
||||
|
|
Loading…
Reference in a new issue