mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 08:17:16 +00:00
27 lines
636 B
Swift
27 lines
636 B
Swift
//
|
|
// DisplayNameProviderProtocol.swift
|
|
// DataModel
|
|
//
|
|
// Created by Brent Simmons on 7/28/16.
|
|
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension Notification.Name {
|
|
public static let DisplayNameDidChange = Notification.Name("DisplayNameDidChange")
|
|
}
|
|
|
|
/// A type that provides a name for display to the user.
|
|
|
|
@MainActor public protocol DisplayNameProvider {
|
|
var nameForDisplay: String { get }
|
|
}
|
|
|
|
public extension DisplayNameProvider {
|
|
|
|
func postDisplayNameDidChangeNotification() {
|
|
NotificationCenter.default.post(name: .DisplayNameDidChange, object: self, userInfo: nil)
|
|
}
|
|
}
|