Temp API update

This commit is contained in:
Peter 2019-01-13 17:25:52 +03:00
parent 42c809d49f
commit 0f00f4987a
3 changed files with 5 additions and 4 deletions

View File

@ -101,7 +101,7 @@ func mergeGroupOrChannel(lhs: Peer?, rhs: Api.Chat) -> Peer? {
switch rhs { switch rhs {
case .chat, .chatEmpty, .chatForbidden, .channelForbidden: case .chat, .chatEmpty, .chatForbidden, .channelForbidden:
return parseTelegramGroupOrChannel(chat: rhs) return parseTelegramGroupOrChannel(chat: rhs)
case let .channel(flags, _, accessHash, title, username, photo, date, version, restrictionReason, adminRights, bannedRights, defaultBannedRights, _/*feed*//*, feedId*/): case let .channel(flags, _, accessHash, title, username, photo, _, _, _, _, _, defaultBannedRights, _/*feed*//*, feedId*/):
if accessHash != nil && (flags & (1 << 12)) == 0 { if accessHash != nil && (flags & (1 << 12)) == 0 {
return parseTelegramGroupOrChannel(chat: rhs) return parseTelegramGroupOrChannel(chat: rhs)
} else if let lhs = lhs as? TelegramChannel { } else if let lhs = lhs as? TelegramChannel {

View File

@ -225,7 +225,7 @@ public class Buffer: CustomStringConvertible {
i += 1 i += 1
} }
if i < _size { if i < _size {
string += "..." string += "...\(_size)b"
} }
} else { } else {
string += "<null>" string += "<null>"

View File

@ -100,7 +100,8 @@ public enum TelegramWallpaper: OrderedItemListEntryContents, Equatable {
extension TelegramWallpaper { extension TelegramWallpaper {
init(apiWallpaper: Api.WallPaper) { init(apiWallpaper: Api.WallPaper) {
switch apiWallpaper { self = TelegramWallpaper.builtin
/*switch apiWallpaper {
case let .wallPaper(wallPaper): case let .wallPaper(wallPaper):
self = .image(telegramMediaImageRepresentationsFromApiSizes(wallPaper.sizes).1) self = .image(telegramMediaImageRepresentationsFromApiSizes(wallPaper.sizes).1)
case let .wallPaperSolid(_, _, bgColor, _): case let .wallPaperSolid(_, _, bgColor, _):
@ -112,6 +113,6 @@ extension TelegramWallpaper {
assertionFailure() assertionFailure()
self = .color(0xffffff) self = .color(0xffffff)
} }
} }*/
} }
} }