LNCommonAlertView+Relation.swift 941 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // LNCommonAlertView+Relation.swift
  3. // Lanu
  4. //
  5. // Created by OneeChan on 2025/12/16.
  6. //
  7. import Foundation
  8. extension LNCommonAlertView {
  9. static func showUnfollowAlert(uid: String) {
  10. let panel = LNCommonAlertView()
  11. panel.titleLabel.text = .init(key: "A00026")
  12. panel.messageLabel.text = .init(key: "A00027")
  13. panel.showConfirm(.init(key: "A00022")) { }
  14. panel.showCancel(.init(key: "A00028")) {
  15. LNRelationManager.shared.operateFollow(uid: uid, follow: false, handler: nil)
  16. }
  17. panel.popup()
  18. }
  19. static func showBlackAlert(uid: String) {
  20. let panel = LNCommonAlertView()
  21. panel.titleLabel.text = .init(key: "A00029")
  22. panel.titleLabel.numberOfLines = 0
  23. panel.showConfirm {
  24. LNRelationManager.shared.blackListUser(uid: uid, black: true, handler: nil)
  25. }
  26. panel.showCancel()
  27. panel.popup()
  28. }
  29. }