100
100
import de .azapps .mirakel .model .task .TaskVanishedException ;
101
101
import de .azapps .mirakel .services .NotificationService ;
102
102
import de .azapps .mirakel .settings .SettingsActivity ;
103
+ import de .azapps .mirakel .static_activities .SurveyActivity ;
103
104
import de .azapps .mirakel .widget .MainWidgetProvider ;
104
105
import de .azapps .mirakelandroid .R ;
105
106
import de .azapps .tools .Log ;
106
107
import de .azapps .tools .OptionalUtils ;
107
108
108
- import static com .google .common .base .Optional .absent ;
109
109
import static com .google .common .base .Optional .of ;
110
110
import static de .azapps .tools .OptionalUtils .withOptional ;
111
111
@@ -601,15 +601,15 @@ private void handleDestroySubtasks(final Task task) {
601
601
@ Override
602
602
public void onClick (final DialogInterface dialog , final int which ) {
603
603
switch (which ) {
604
- case 0 : // Only this task
605
- task .destroy ();
606
- updateAfterDestroy ();
607
- break ;
608
- case 1 : // also subtasks
609
- task .destroySubtasks ();
610
- task .destroy ();
611
- updateAfterDestroy ();
612
- break ;
604
+ case 0 : // Only this task
605
+ task .destroy ();
606
+ updateAfterDestroy ();
607
+ break ;
608
+ case 1 : // also subtasks
609
+ task .destroySubtasks ();
610
+ task .destroy ();
611
+ updateAfterDestroy ();
612
+ break ;
613
613
}
614
614
}
615
615
}).show ();
@@ -622,12 +622,13 @@ private void updateAfterDestroy() {
622
622
623
623
private void handleDestroyRecurringTask (final Task task ) {
624
624
TaskDialogHelpers .handleChangeRecurringTask (this , getString (R .string .destroy_recurring_task ,
625
- task .getName ()), new TaskDialogHelpers .OnRecurrenceChange () {
625
+ task .getName ()), new TaskDialogHelpers .OnRecurrenceChange () {
626
626
@ Override
627
627
public void handleSingleChange () {
628
628
task .destroy ();
629
629
updateAfterDestroy ();
630
630
}
631
+
631
632
@ Override
632
633
public void handleMultiChange () {
633
634
Optional <Task > master = task .getRecurrenceMaster ();
@@ -998,11 +999,11 @@ public void run() {
998
999
inflater .inflate (newmenu , MainActivity .this .menu );
999
1000
if (MainActivity .this .menu .findItem (R .id .menu_sync_now ) != null ) {
1000
1001
MainActivity .this .menu .findItem (R .id .menu_sync_now )
1001
- .setVisible (MirakelModelPreferences .useSync ());
1002
+ .setVisible (MirakelModelPreferences .useSync ());
1002
1003
}
1003
1004
if (MainActivity .this .menu .findItem (R .id .menu_contact ) != null ) {
1004
1005
MainActivity .this .menu .findItem (R .id .menu_contact )
1005
- .setVisible (BuildHelper .isBeta ());
1006
+ .setVisible (BuildHelper .isBeta ());
1006
1007
}
1007
1008
if (!fromShare ) {
1008
1009
updateShare ();
@@ -1220,6 +1221,12 @@ private void initConfiguration() {
1220
1221
private void initThirdParty () {
1221
1222
// Show ChangeLog
1222
1223
final Changelog cl = new Changelog (this );
1224
+ cl .setOnShowChangelog (new Changelog .OnChangelogShown () {
1225
+ @ Override
1226
+ public void changelogShown (){
1227
+ showSurvey ();
1228
+ }
1229
+ });
1223
1230
cl .showChangelog ();
1224
1231
final ILoveFS ilfs =
new ILoveFS (
this ,
"[email protected] " ,
1225
1232
DefinitionsHelper .APK_NAME );
@@ -1238,6 +1245,12 @@ public void onClick(final DialogInterface dialog,
1238
1245
}
1239
1246
}
1240
1247
1248
+ private void showSurvey () {
1249
+ final Intent intent = new Intent (MainActivity .this ,
1250
+ SurveyActivity .class );
1251
+ startActivity (intent );
1252
+ }
1253
+
1241
1254
@ Override
1242
1255
protected void onCreate (final Bundle savedInstanceState ) {
1243
1256
initFirst ();
@@ -1407,6 +1420,9 @@ public void run() {
1407
1420
Log .wtf (MainActivity .TAG , "List vanished on task cloning" );
1408
1421
}
1409
1422
break ;
1423
+ case R .id .menu_survey :
1424
+ showSurvey ();
1425
+ break ;
1410
1426
default :
1411
1427
return super .onOptionsItemSelected (item );
1412
1428
}
0 commit comments