mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Add Shift + Ans shortcut to go to the last application
This commit is contained in:
@@ -36,3 +36,18 @@ App::Snapshot * AppsContainerStorage::appSnapshotAtIndex(int index) {
|
||||
assert(index >= 0 && index < k_numberOfCommonApps);
|
||||
return snapshots[index];
|
||||
}
|
||||
|
||||
// Get the index of the app from its snapshot
|
||||
int AppsContainerStorage::appIndexFromSnapshot(App::Snapshot * snapshot) {
|
||||
App::Snapshot * snapshots[] = {
|
||||
homeAppSnapshot()
|
||||
APPS_CONTAINER_SNAPSHOT_LIST
|
||||
};
|
||||
assert(sizeof(snapshots)/sizeof(snapshots[0]) == k_numberOfCommonApps);
|
||||
for (int i = 0; i < k_numberOfCommonApps; i++) {
|
||||
if (snapshots[i] == snapshot) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
Reference in New Issue
Block a user