Changes are per review comments

This commit is contained in:
Sumanth Nadigadda 2021-07-12 20:07:50 +05:30
parent bb10fdf818
commit f74372c56e
2 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@
//
public class ListLeftVariableIconWithRightCaretBodyTextModel: ListItemModel, MoleculeModelProtocol {
public class ListLeftVariableIconWithRightCaretBodyTextModel: ListItemModel, ParentMoleculeModelProtocol {
//-----------------------------------------------------
// MARK: - Properties
//-----------------------------------------------------

View File

@ -29,13 +29,13 @@ public class PagePlayAudioBehavior: PageCustomActionHandlerBehavior {
// MARK: - Active Model
//--------------------------------------------------
public static var activeAudioPlayerDelegate: PagePlayAudioBehaviorConsumerProtocol?
public static var activeAudioPlayerDelegate: PagePlayAudioBehaviorConsumerProtocol?
//--------------------------------------------------
// MARK: - Delegate
//--------------------------------------------------
var delegate: MVMCoreUIDelegateObject?
weak var delegate: MVMCoreUIDelegateObject?
//--------------------------------------------------
// MARK: - Init
@ -57,7 +57,6 @@ public class PagePlayAudioBehavior: PageCustomActionHandlerBehavior {
// Update the model. play -> pause OR pause -> play
if Self.activeAudioPlayerDelegate?.isPlaying ?? false {
Self.activeAudioPlayerDelegate?.pause()
} else {
Self.activeAudioPlayerDelegate?.play()
}
@ -65,6 +64,7 @@ public class PagePlayAudioBehavior: PageCustomActionHandlerBehavior {
}
public func onPageHidden(_ delegateObject: MVMCoreUIDelegateObject?) {
// TODO: Stop player
//Stop player
Self.activeAudioPlayerDelegate?.pause()
}
}