Skip to content

Commit

Permalink
#120 Last activity duration is now updated when DS is finished
Browse files Browse the repository at this point in the history
  • Loading branch information
kperusko committed Feb 12, 2016
1 parent 97c8967 commit 529cd8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DesignStudioExpress/ViewModels/RunningDesignStudio.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ class RunningDesignStudio: NSObject {
// show the challenge screen
NSNotificationCenter.defaultCenter().postNotificationName(NotificationIdentifier.ShowNextChallengeScreen.rawValue, object: self, userInfo: nil)
} else {
// update finished activity time before closing DS
self.updateCurrentActivity()
self.finishDesignStudio()
// we've reached the end, show the end screen
NSNotificationCenter.defaultCenter().postNotificationName(NotificationIdentifier.ShowEndDesignStudioScreen.rawValue, object: self, userInfo: nil)
Expand Down Expand Up @@ -331,7 +333,7 @@ class RunningDesignStudio: NSObject {
self.startCurrentActivity()

return result
}
}

// update the duration of the activity to the actual duration of the activity
// and status of the activity (finished)
Expand Down

0 comments on commit 529cd8d

Please sign in to comment.