1
0
Fork 0
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:
Dmitry Serov 2023-11-03 17:50:45 +00:00 committed by GitHub
parent a2b547fb50
commit 2a65169461
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 0 additions and 47 deletions

View file

@ -106,11 +106,6 @@ typedef NS_ENUM(NSUInteger, PopupPriority) {
}
}
- (void)dealloc
{
[NSNotificationCenter.defaultCenter removeObserver:self];
}
- (void)setDestination:(id)sender
{
NSOpenPanel* panel = [NSOpenPanel openPanel];

View file

@ -176,8 +176,6 @@ typedef NS_ENUM(NSUInteger, PopupPriority) {
- (void)dealloc
{
[NSNotificationCenter.defaultCenter removeObserver:self];
[_fTimer invalidate];
}

View file

@ -50,11 +50,6 @@
return self;
}
- (void)dealloc
{
[NSNotificationCenter.defaultCenter removeObserver:self];
}
- (void)setTorrents:(NSArray<NSString*>*)files
{
uint64_t size = 0;

View file

@ -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"];

View file

@ -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;

View file

@ -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;

View file

@ -171,8 +171,6 @@ typedef NS_ENUM(NSUInteger, TabTag) {
- (void)dealloc
{
[NSNotificationCenter.defaultCenter removeObserver:self];
if ([_fViewController respondsToSelector:@selector(saveViewSize)])
{
[_fViewController saveViewSize];

View file

@ -141,7 +141,6 @@ static NSTimeInterval const kUpdateSeconds = 0.75;
- (void)dealloc
{
[NSNotificationCenter.defaultCenter removeObserver:self];
[_fTimer invalidate];
}

View file

@ -188,8 +188,6 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
- (void)dealloc
{
[NSNotificationCenter.defaultCenter removeObserver:self];
[_fPortStatusTimer invalidate];
if (_fPortChecker)
{

View file

@ -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

View file

@ -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];

View file

@ -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"