mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 19:30:29 +00:00
Update sort order
This commit is contained in:
parent
87ba2ef4c3
commit
7eed291fbf
@ -121,7 +121,7 @@ final class AffiliateProgramSetupScreenComponent: Component {
|
|||||||
|
|
||||||
private var suggestedStarBotList: TelegramSuggestedStarRefBotList?
|
private var suggestedStarBotList: TelegramSuggestedStarRefBotList?
|
||||||
private var suggestedStarBotListDisposable: Disposable?
|
private var suggestedStarBotListDisposable: Disposable?
|
||||||
private var suggestedSortMode: TelegramSuggestedStarRefBotList.SortMode = .date
|
private var suggestedSortMode: TelegramSuggestedStarRefBotList.SortMode = .profitability
|
||||||
private var isSuggestedSortModeUpdating: Bool = false
|
private var isSuggestedSortModeUpdating: Bool = false
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
@ -417,9 +417,9 @@ If you end your affiliate program:
|
|||||||
var items: [ContextMenuItem] = []
|
var items: [ContextMenuItem] = []
|
||||||
|
|
||||||
let availableModes: [(TelegramSuggestedStarRefBotList.SortMode, String)] = [
|
let availableModes: [(TelegramSuggestedStarRefBotList.SortMode, String)] = [
|
||||||
(.date, "Date"),
|
(.profitability, "Profitability"),
|
||||||
(.revenue, "Revenue"),
|
(.revenue, "Revenue"),
|
||||||
(.profitability, "Profitability")
|
(.date, "Date")
|
||||||
]
|
]
|
||||||
for (mode, title) in availableModes {
|
for (mode, title) in availableModes {
|
||||||
let isSelected = mode == self.suggestedSortMode
|
let isSelected = mode == self.suggestedSortMode
|
||||||
@ -1363,6 +1363,13 @@ If you end your affiliate program:
|
|||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
var suggestedSectionItems: [AnyComponentWithIdentity<Empty>] = []
|
var suggestedSectionItems: [AnyComponentWithIdentity<Empty>] = []
|
||||||
|
if suggestedStarBotListItems.isEmpty {
|
||||||
|
suggestedSectionItems.append(AnyComponentWithIdentity(id: "empty", component: AnyComponent(TransformContents(
|
||||||
|
content: AnyComponent(),
|
||||||
|
fixedSize: CGSize(width: 1.0, height: 100.0),
|
||||||
|
translation: CGPoint()
|
||||||
|
))))
|
||||||
|
}
|
||||||
for item in suggestedStarBotListItems {
|
for item in suggestedStarBotListItems {
|
||||||
let commissionTitle = "\(item.program.commissionPermille / 10)%"
|
let commissionTitle = "\(item.program.commissionPermille / 10)%"
|
||||||
let durationTitle: String
|
let durationTitle: String
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user