mirror of
https://github.com/memen45/SubMusic.git
synced 2026-12-02 10:09:04 +01:00
25 lines
553 B
MonkeyC
25 lines
553 B
MonkeyC
using Toybox.Application;
|
|
using Toybox.System;
|
|
|
|
module SubMusic {
|
|
module PlayableStore {
|
|
|
|
var d_store = new Store(Storage.PLAYABLE, {});
|
|
|
|
function get() {
|
|
return d_store.value();
|
|
}
|
|
|
|
// these functions should be used only internally by IPlayable class
|
|
function save(playable) {
|
|
d_store.setValue(playable.toStorage());
|
|
return d_store.update();
|
|
}
|
|
|
|
function remove() {
|
|
d_store.setValue(null);
|
|
return d_store.update();
|
|
}
|
|
}
|
|
}
|