File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6060use OCA \Polls \Provider \ReferenceProvider ;
6161use OCA \Polls \Provider \SearchProvider ;
6262use OCA \Polls \UserSession ;
63+ use OCP \App \IAppManager ;
6364use OCP \AppFramework \App ;
6465use OCP \AppFramework \Bootstrap \IBootContext ;
6566use OCP \AppFramework \Bootstrap \IBootstrap ;
@@ -155,6 +156,7 @@ private function registerServices(IRegistrationContext $context): void {
155156 $ c ->get (UserSession::class),
156157 $ c ->get (SystemSettings::class),
157158 $ c ->get (LoggerInterface::class),
159+ $ c ->get (IAppManager::class),
158160 );
159161 });
160162
Original file line number Diff line number Diff line change 1212use OCA \Polls \AppConstants ;
1313use OCA \Polls \Model \Group \Group ;
1414use OCA \Polls \UserSession ;
15+ use OCP \App \IAppManager ;
1516use OCP \IAppConfig ;
1617use Psr \Log \LoggerInterface ;
1718
@@ -70,6 +71,7 @@ public function __construct(
7071 private UserSession $ userSession ,
7172 private SystemSettings $ systemSettings ,
7273 protected LoggerInterface $ logger ,
74+ protected IAppManager $ appManager ,
7375 ) {
7476 }
7577
@@ -101,6 +103,7 @@ public function getAppSettings(): array {
101103 'useActivity ' => false ,
102104 'navigationPollsInList ' => false ,
103105 'updateType ' => $ this ->getUpdateType (),
106+ 'currentVersion ' => $ this ->appManager ->getAppVersion (AppConstants::APP_ID ),
104107 ];
105108
106109 if ($ this ->userSession ->getIsLoggedIn ()) {
You can’t perform that action at this time.
0 commit comments