1
1
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:
Daniel Barber 2019-03-20 19:33:59 -04:00
parent 92ca7ea93f
commit 9eacd2b25a
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
3 changed files with 6 additions and 6 deletions

View File

@ -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)
}

View File

@ -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 {

View File

@ -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)