Changes are per review comments
This commit is contained in:
parent
bb10fdf818
commit
f74372c56e
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
|
||||
public class ListLeftVariableIconWithRightCaretBodyTextModel: ListItemModel, MoleculeModelProtocol {
|
||||
public class ListLeftVariableIconWithRightCaretBodyTextModel: ListItemModel, ParentMoleculeModelProtocol {
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//-----------------------------------------------------
|
||||
|
||||
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user