Skip to content

Commit

Permalink
🔥 Remove the transition notify plugin
Browse files Browse the repository at this point in the history
Per e-mission/e-mission-docs#838 (comment)
This is the first step in which I remove all the controls related to it

```
$ grep -ri notify www/js/control | wc -l
       0
$ grep -ri notify www/templates/control/ | wc -l
       0
```

Testing done:
Profile screen loads correctly
  • Loading branch information
shankari committed Feb 17, 2023
1 parent 12c5384 commit 8004804
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 60 deletions.
1 change: 0 additions & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
<script src="js/control/uploadService.js"></script>
<script src="js/control/collect-settings.js"></script>
<script src="js/control/sync-settings.js"></script>
<script src="js/control/transition-notify-settings.js"></script>
<script src="js/metrics-factory.js"></script>
<script src="js/metrics-mappings.js"></script>
<!--script src="js/goals/party.js"></script-->
Expand Down
44 changes: 0 additions & 44 deletions www/js/control/general-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ angular.module('emission.main.control',['emission.services',
'emission.i18n.utils',
'emission.main.control.collection',
'emission.main.control.sync',
'emission.main.control.tnotify',
'ionic-datepicker',
'ionic-datepicker.provider',
'emission.splash.startprefs',
Expand All @@ -23,7 +22,6 @@ angular.module('emission.main.control',['emission.services',
$rootScope, KVStore, ionicDatePicker,
StartPrefs, ControlHelper, EmailHelper, UploadHelper,
ControlCollectionHelper, ControlSyncHelper,
ControlTransitionNotifyHelper,
CarbonDatasetHelper,
UpdateCheck, i18nUtils,
CalorieCal, ClientStats, CommHelper, Logger,
Expand Down Expand Up @@ -194,14 +192,6 @@ angular.module('emission.main.control',['emission.services',
});
};

$scope.getTNotifySettings = function() {
ControlTransitionNotifyHelper.getTNotifySettings().then(function(showConfig) {
$scope.$apply(function() {
$scope.settings.tnotify.show_config = showConfig;
})
});
};

$scope.getEmail = function() {
ControlHelper.getUserEmail().then(function(response) {
console.log("user email = "+response);
Expand Down Expand Up @@ -273,36 +263,6 @@ angular.module('emission.main.control',['emission.services',
});
}

$scope.testTripEndNotify = function() {
$ionicPopup.alert({template: 'test for local notification 0.9.0-beta.3+ only'});
/*
var testCfg = {
id: 737678,
title: $translate.instant('post-trip-prompt.notification-title'),
text: "Testing if this works",
icon: 'file://img/icon.png',
actions: "TRIP_CONFIRM"
};
$window.cordova.plugins.notification.local.addActions('TRIP_CONFIRM', [{
id: 'MUTE',
type: 'button',
title: 'Mute',
ui: 'decline'
},{
id: 'SNOOZE',
type: 'button',
title: 'Snooze',
launch: true
},{
id: 'CHOOSE',
type: 'button',
title: "Choose",
launch: true
}]);
$window.cordova.plugins.notification.local.schedule(testCfg);
*/
}

$scope.invalidateCache = function() {
window.cordova.plugins.BEMUserCache.invalidateAllCache().then(function(result) {
$scope.$apply(function() {
Expand Down Expand Up @@ -340,7 +300,6 @@ angular.module('emission.main.control',['emission.services',
$scope.settings = {};
$scope.settings.collect = {};
$scope.settings.sync = {};
$scope.settings.tnotify = {};
$scope.settings.auth = {};
$scope.settings.connect = {};
$scope.settings.clientAppVer = ClientStats.getAppVersion();
Expand All @@ -355,7 +314,6 @@ angular.module('emission.main.control',['emission.services',
$scope.getConnectURL();
$scope.getCollectionSettings();
$scope.getSyncSettings();
$scope.getTNotifySettings();
$scope.getEmail();
$scope.getState().then($scope.isTrackingOn).then(function(isTracking) {
$scope.$apply(function() {
Expand Down Expand Up @@ -493,8 +451,6 @@ angular.module('emission.main.control',['emission.services',
$scope.forceState = ControlCollectionHelper.forceState;
$scope.editCollectionConfig = ControlCollectionHelper.editConfig;
$scope.editSyncConfig = ControlSyncHelper.editConfig;
$scope.editTNotifyConfig = ControlTransitionNotifyHelper.editConfig;


$scope.isAndroid = function() {
return ionic.Platform.isAndroid();
Expand Down
15 changes: 0 additions & 15 deletions www/templates/control/main-control.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@
<div class="control-list-text" translate>{{'.nuke-all'}}</div>
<div ng-click="nukeUserCache()" class="control-icon-button"><i class="ion-ios7-bell"></i></div>
</div>
<div class="control-list-item">
<div class="control-list-text" translate> {{'.test-notification'}}</div>
<div ng-click="testTripEndNotify()" class="control-icon-button"><i class="ion-android-note"></i></div>
</div>
<div class="control-list-item">
<div class="control-list-text" translate>{{'.set-ui-channel'}}</div>
<input type="text" name="userName"
Expand Down Expand Up @@ -187,17 +183,6 @@
<div class="col detail item-text-wrap control-info"> {{settings.connect.url}}</div>
</ion-item>
</ion-list>

<div class="control-list-item">
<div class="control-list-text" translate>{{'.transition-notify'}}</div>
<div ng-click="editTNotifyConfig($event)" class="gray-icon control-icon-button"><i class="ion-edit"></i></div>
</div>
<ion-list>
<ion-item ng-repeat="entry in settings.tnotify.show_config">
<div class="row" ng-include="'templates/control/transition-notify-display-detail.html'"></div>
</ion-item>
</ion-list>
</div>
<div class="control-list-item">
<div class="control-list-text" translate>{{'.app-version'}}</div>
<div class="control-version-number">{{settings.clientAppVer}}</div>
Expand Down

0 comments on commit 8004804

Please sign in to comment.