pull/41/head
Niels Andriesse 6 years ago
parent 4c21cecc66
commit 6056575cdf

@ -1495,10 +1495,10 @@ static NSTimeInterval launchStartedAt;
- (NSArray *)publicChats
{
return @[
[[LKGroupChat alloc] initWithKindAsString:@"publicChat" id:@(LKGroupChatAPI.publicChatID).stringValue server:LKGroupChatAPI.publicChatServer displayName:NSLocalizedString(@"Loki Public Chat", @"") isDeletable:true],
[[LKGroupChat alloc] initWithKindAsString:@"rss" id:@"loki.network.feed" server:@"https://loki.network/feed/" displayName:NSLocalizedString(@"Loki.network News", @"") isDeletable:true],
[[LKGroupChat alloc] initWithKindAsString:@"rss" id:@"loki.network.messenger-update" server:@"https://loki.network/category/messenger-updates/feed/" displayName:NSLocalizedString(@"Messenger updates", @"") isDeletable:false],
];
[[LKGroupChat alloc] initWithKindAsString:@"publicChat" id:@(LKGroupChatAPI.publicChatID).stringValue server:LKGroupChatAPI.publicChatServer displayName:NSLocalizedString(@"Loki Public Chat", @"") isDeletable:true],
[[LKGroupChat alloc] initWithKindAsString:@"rss" id:@"loki.network.feed" server:@"https://loki.network/feed/" displayName:NSLocalizedString(@"Loki News", @"") isDeletable:true],
[[LKGroupChat alloc] initWithKindAsString:@"rss" id:@"loki.network.messenger-update" server:@"https://loki.network/category/messenger-updates/feed/" displayName:NSLocalizedString(@"Messenger Updates", @"") isDeletable:false],
];
}
- (void)setupPublicChatGroupsIfNeeded

@ -2607,6 +2607,8 @@
"Update Required" = "Update Required";
"This version of Loki Messenger is no longer supported. Please press OK to reset your account and migrate to the latest version." = "This version of Loki Messenger is no longer supported. Please press OK to reset your account and migrate to the latest version.";
"Loki Public Chat" = "Loki Public Chat";
"Loki News" = "Loki News";
"Messenger Updates" = "Messenger Updates";
"Show QR Code" = "Show QR Code";
"This is your personal QR code. Other people can scan it to start a secure conversation with you." = "This is your personal QR code. Other people can scan it to start a secure conversation with you.";
"Scan a QR Code Instead" = "Scan a QR Code Instead";

@ -13,20 +13,15 @@ public final class LokiGroupChat : NSObject {
}
}
@objc public var isRSS: Bool {
switch kind {
case .publicChat(let id): return false
case .rss(let customID): return true
}
@objc public var isPublicChat: Bool {
if case .publicChat(_) = kind { return true } else { return false }
}
@objc public var isPublicChat: Bool {
switch kind {
case .publicChat(let id): return true
case .rss(let customID): return false
}
@objc public var isRSS: Bool {
if case .rss(_) = kind { return true } else { return false }
}
// MARK: Kind
public enum Kind { case publicChat(id: UInt), rss(customID: String) }
// MARK: Initialization

Loading…
Cancel
Save