Skip to content

Commit 3341114

Browse files
committed
Defined app trait
1 parent 370ecde commit 3341114

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/displayapp/apps/Apps.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ namespace Pinetime {
3030
Steps,
3131
Dice,
3232
Weather,
33+
Gallery,
3334
PassKey,
3435
QuickSettings,
3536
Settings,

src/displayapp/screens/Gallery.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "displayapp/screens/FileView.h"
55
#include "displayapp/DisplayApp.h"
66
#include <lvgl/lvgl.h>
7+
#include "Symbols.h"
78

89
namespace Pinetime {
910
namespace Applications {
@@ -28,5 +29,19 @@ namespace Pinetime {
2829
int index;
2930
};
3031
}
32+
33+
template <>
34+
struct AppTraits<Apps::Gallery> {
35+
static constexpr Apps app = Apps::Gallery;
36+
static constexpr const char* icon = Screens::Symbols::gallery;
37+
38+
static Screens::Screen* Create(AppControllers& controllers) {
39+
return new Screens::Gallery(controllers.filesystem);
40+
};
41+
42+
static bool IsAvailable(Pinetime::Controllers::FS& filesystem) {
43+
return true;
44+
};
45+
};
3146
}
3247
}

0 commit comments

Comments
 (0)