Files
damus/damus/Models/DamusState.swift
William Casarin 355b8c5da8 Use kingfisher for profile pic loading
Changelog-Changed: Use an optimized library for image loading
Signed-off-by: William Casarin <jb55@jb55.com>
2022-10-16 11:42:20 -07:00

28 lines
732 B
Swift

//
// DamusState.swift
// damus
//
// Created by William Casarin on 2022-04-30.
//
import Foundation
struct DamusState {
let pool: RelayPool
let keypair: Keypair
let likes: EventCounter
let boosts: EventCounter
let contacts: Contacts
let tips: TipCounter
let profiles: Profiles
let dms: DirectMessagesModel
var pubkey: String {
return keypair.pubkey
}
static var empty: DamusState {
return DamusState.init(pool: RelayPool(), keypair: Keypair(pubkey: "", privkey: ""), likes: EventCounter(our_pubkey: ""), boosts: EventCounter(our_pubkey: ""), contacts: Contacts(), tips: TipCounter(our_pubkey: ""), profiles: Profiles(), dms: DirectMessagesModel())
}
}