Updated at now displays a special text if remote updates are disabled

This commit is contained in:
Michael Starke
2019-08-27 11:30:08 +02:00
parent 224ca6c65b
commit 09eb1dcf41
2 changed files with 11 additions and 1 deletions

View File

@@ -13,6 +13,7 @@
#import "MPPluginRepositoryItem.h"
#import "MPPluginVersionComparator.h"
#import "MPPluginStatusTableCellView.h"
#import "MPSettingsHelper.h"
typedef NS_ENUM(NSUInteger, MPPluginTableColumn) {
@@ -39,7 +40,13 @@ typedef NS_ENUM(NSUInteger, MPPluginTableColumn) {
- (void)viewDidLoad {
[super viewDidLoad];
self.downloadedItems = [[NSMutableSet alloc] init];
[self.updatedAtTextField bind:NSValueBinding toObject:MPPluginRepository.defaultRepository withKeyPath:NSStringFromSelector(@selector(updatedAt)) options:nil];
BOOL allowRemoteData = [NSUserDefaults.standardUserDefaults boolForKey:kMPSettingsKeyAllowRemoteFetchOfPluginRepository];
if(allowRemoteData) {
[self.updatedAtTextField bind:NSValueBinding toObject:MPPluginRepository.defaultRepository withKeyPath:NSStringFromSelector(@selector(updatedAt)) options:nil];
}
else {
self.updatedAtTextField.stringValue = NSLocalizedString(@"REPOSITORY_UPDATED_AT_LOCAL", @"Updated at text when the local plugin defintino is used");
}
[self _refreshRepository];
}

View File

@@ -632,6 +632,9 @@
/* Message text for the recommend password change alert */
"RECOMMEND_PASSWORD_CHANGE_ALERT_TITLE" = "Please change the database password!";
/* Updated at text when the local plugin defintino is used */
"REPOSITORY_UPDATED_AT_LOCAL" = "Never (using bundled version)";
/* Restart */
"RESTART" = "Restart";