mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Rename delegate methods to better reflect purpose
This commit is contained in:
parent
92ca7ea93f
commit
9eacd2b25a
@ -36,11 +36,11 @@ class NotificationsController: MPDClientDelegate {
|
||||
)
|
||||
}
|
||||
|
||||
func willUpdateDatabase(mpdClient: MPDClient) {
|
||||
func willStartDatabaseUpdate(mpdClient: MPDClient) {
|
||||
sendNotification(name: Notification.databaseUpdateStarted)
|
||||
}
|
||||
|
||||
func didUpdateDatabase(mpdClient: MPDClient) {
|
||||
func didFinishDatabaseUpdate(mpdClient: MPDClient) {
|
||||
sendNotification(name: Notification.databaseUpdateFinished)
|
||||
}
|
||||
|
||||
|
||||
@ -52,9 +52,9 @@ extension MPDClient {
|
||||
self.fetchStatus()
|
||||
|
||||
if self.status?.updating ?? false {
|
||||
self.delegate?.willUpdateDatabase(mpdClient: self)
|
||||
self.delegate?.willStartDatabaseUpdate(mpdClient: self)
|
||||
} else {
|
||||
self.delegate?.didUpdateDatabase(mpdClient: self)
|
||||
self.delegate?.didFinishDatabaseUpdate(mpdClient: self)
|
||||
}
|
||||
}
|
||||
if !mpdIdle.isEmpty {
|
||||
|
||||
@ -15,8 +15,8 @@ protocol MPDClientDelegate {
|
||||
func didUpdateState(mpdClient: MPDClient, state: MPDClient.Status.State)
|
||||
func didUpdateTime(mpdClient: MPDClient, total: UInt, elapsedMs: UInt)
|
||||
|
||||
func willUpdateDatabase(mpdClient: MPDClient)
|
||||
func didUpdateDatabase(mpdClient: MPDClient)
|
||||
func willStartDatabaseUpdate(mpdClient: MPDClient)
|
||||
func didFinishDatabaseUpdate(mpdClient: MPDClient)
|
||||
|
||||
func didUpdateQueue(mpdClient: MPDClient, queue: [MPDClient.Song])
|
||||
func didUpdateQueuePos(mpdClient: MPDClient, song: Int)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user