MCA launches task edit screen

pull/281/head
Alex Baker 10 years ago
parent db11745be6
commit 4f999bf5fc

@ -22,8 +22,6 @@ import android.widget.TextView;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.reminders.SnoozeCallback;
import com.todoroo.astrid.reminders.SnoozeDialog;
import com.todoroo.astrid.service.StartupService;
import com.todoroo.astrid.service.TaskService;
@ -31,6 +29,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tasks.R;
import org.tasks.injection.InjectingFragmentActivity;
import org.tasks.intents.TaskIntents;
import org.tasks.preferences.ActivityPreferences;
import org.tasks.preferences.BasicPreferences;
import org.tasks.preferences.ResourceResolver;
@ -52,7 +51,6 @@ public class MissedCallActivity extends InjectingFragmentActivity {
// Prompt user to ignore all missed calls after this many ignore presses
private static final int IGNORE_PROMPT_COUNT = 3;
private static final String FRAG_TAG_SNOOZE_DIALOG = "frag_tag_snooze_dialog";
@Inject StartupService startupService;
@Inject TaskService taskService;
@ -180,34 +178,15 @@ public class MissedCallActivity extends InjectingFragmentActivity {
callLaterButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
final String taskTitle;
String dialogTitle;
if (TextUtils.isEmpty(name)) {
taskTitle = getString(R.string.MCA_task_title_no_name, number);
dialogTitle = getString(R.string.MCA_schedule_dialog_title, number);
} else {
taskTitle = getString(R.string.MCA_task_title_name, name, number);
dialogTitle = getString(R.string.MCA_schedule_dialog_title, name);
}
SnoozeDialog snoozeDialog = new SnoozeDialog();
snoozeDialog.setTitle(dialogTitle);
snoozeDialog.setSnoozeCallback(new SnoozeCallback() {
@Override
public void snoozeForTime(long time) {
Task newTask = new Task();
newTask.setTitle(taskTitle);
newTask.setDueDate(time);
taskService.save(newTask);
finish();
}
});
snoozeDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
finish();
}
});
snoozeDialog.show(getSupportFragmentManager(), FRAG_TAG_SNOOZE_DIALOG);
Task task = new Task() {{
setTitle(TextUtils.isEmpty(name)
? getString(R.string.MCA_task_title_no_name, number)
: getString(R.string.MCA_task_title_name, name, number));
}};
taskService.save(task);
TaskIntents
.getEditTaskStack(MissedCallActivity.this, null, task.getId())
.startActivities();
}
});
}

@ -125,7 +125,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks ще ви уведомява за пропуснати повиквания и ще предлага да напомни да се обадите</string>
<string name="MCA_task_title_name">Обади се на %1$s на %2$s</string>
<string name="MCA_task_title_no_name">Обади се на %s </string>
<string name="MCA_schedule_dialog_title">Обади се на %s в...</string>
<string name="CRA_ignore">Игнорирай</string>
<string name="CRA_title">Нуждаете се от списък за среща?</string>
<string name="CRA_ignore_title">Игнориране на всички събития в календара?</string>

@ -112,7 +112,6 @@
<string name="MCA_ignore_this">Ignora només aquesta trucada</string>
<string name="MCA_task_title_name">Retorna la trucada a en/na %1$s a %2$s</string>
<string name="MCA_task_title_no_name">Retorna la trucada a %s</string>
<string name="MCA_schedule_dialog_title">Retorna la trucada a %s en...</string>
<string name="EPr_title">Tasks: Paràmetres</string>
<string name="EPr_deactivated">desactivat</string>
<string name="EPr_appearance_header">Aparença</string>

@ -121,7 +121,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks Vás upozorní na zmeškané hovory a připomene Vám, abyste zavolal zpět</string>
<string name="MCA_task_title_name">Zavolat %1$s zpět v %2$s</string>
<string name="MCA_task_title_no_name">Zavolat %s zpět</string>
<string name="MCA_schedule_dialog_title">Zavolat %s zpět...</string>
<string name="CRA_ignore">Ignorovat</string>
<string name="CRA_title">Potřebujete seznam schůze?</string>
<string name="CRA_ignore_title">Ignorovat všechny události v kalendáři?</string>

@ -122,7 +122,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks wird Sie über versäumte Anrufe informieren und an Rückrufe erinnern</string>
<string name="MCA_task_title_name">%1$s unter %2$s zurückrufen</string>
<string name="MCA_task_title_no_name">%s zurückrufen</string>
<string name="MCA_schedule_dialog_title">%s zurückrufen in ...</string>
<string name="CRA_ignore">Ablehnen</string>
<string name="CRA_title">Willst Du eine Besprechungsliste erstellen?</string>
<string name="CRA_ignore_title">Alle Kalendertermine ablehnen?</string>

@ -119,7 +119,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Η εφαρμογή θα σας ενημερώσει για αναπάντητες κλήσεις και θα σας υπενθυμίσει για να τις απαντήσετε μετά</string>
<string name="MCA_task_title_name">Ξανακαλέστε %1$s στίς %2$s</string>
<string name="MCA_task_title_no_name">Ξανακαλέστε %s</string>
<string name="MCA_schedule_dialog_title">Ξανακαλέστε %s σε...</string>
<string name="CRA_ignore">Αγνοήστε</string>
<string name="CRA_title">Χρειάζεστε λίστα για συνάντηση?</string>
<string name="CRA_ignore_title">Αγνόησή όλων των γεγονότων ημερολογίου;</string>

@ -122,7 +122,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks le notificará de las llamadas perdidas y le recordará que devuelva la llamada.</string>
<string name="MCA_task_title_name">Devolver la llamada a %1$s al %2$s</string>
<string name="MCA_task_title_no_name">Devolver la llamada a %s</string>
<string name="MCA_schedule_dialog_title">Devolver la llamada a %s en...</string>
<string name="CRA_ignore">Ignorar</string>
<string name="CRA_title">¿Necesita una lista de reuniones?</string>
<string name="CRA_ignore_title">¿Ignorar todos los eventos del calendario?</string>

@ -120,7 +120,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Atrid vous avertira en cas d\'appels manqués et vous proposera de rappeler.</string>
<string name="MCA_task_title_name">Rappeler %1$s au %2$s</string>
<string name="MCA_task_title_no_name">Rappeler %s</string>
<string name="MCA_schedule_dialog_title">Rappeler %s dans...</string>
<string name="CRA_ignore">Ignorer</string>
<string name="CRA_title">Besoin d\'une liste de réunion ? </string>
<string name="CRA_ignore_title">Ignorer tous les événements du calendrier ? </string>

@ -109,7 +109,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks ti notificherà per le chiamate perse e ti offrirà di ricordarti di richiamare</string>
<string name="MCA_task_title_name">Richiama %1$s al %2$s</string>
<string name="MCA_task_title_no_name">Richiama %s</string>
<string name="MCA_schedule_dialog_title">Richiama %s tra...</string>
<string name="CRA_ignore">Ignora</string>
<string name="CRA_title">Hai bisogno di una lista per le riunioni?</string>
<string name="CRA_ignore_title">Ignora tutti gli eventi del calendario?</string>

@ -119,7 +119,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">אסטריד תודיע לך על שיחות שלא נענו, ותציע להזכיר לך להחזיר שיחה.</string>
<string name="MCA_task_title_name">\"החזר שיחה ל־%1$s ב־%2$s\"</string>
<string name="MCA_task_title_no_name">החזר שיחה ל־%s</string>
<string name="MCA_schedule_dialog_title">החזר שיחה ל־%s ב...</string>
<string name="CRA_ignore">התעלם</string>
<string name="CRA_title">צריך רשימה לפגישה?</string>
<string name="CRA_ignore_title">להתעלם מכל אירועי היומן?</string>

@ -123,7 +123,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks は応答しなかった呼び出しを通知して折り返し連絡するようにリマインドします</string>
<string name="MCA_task_title_name">%1$s に %2$s 折り返し連絡</string>
<string name="MCA_task_title_no_name">%s に折り返し連絡</string>
<string name="MCA_schedule_dialog_title">%s に折り返し連絡...</string>
<string name="CRA_ignore">無視する</string>
<string name="CRA_title">ミーティングリストが必要ですか?</string>
<string name="CRA_ignore_title">すべてのカレンダーイベントを無視しますか?</string>

@ -126,7 +126,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks는 부재중 전화 내역과 이를 회신할 수 있도록 알려줍니다</string>
<string name="MCA_task_title_name">%1$s 님에게 %2$s 에 다시 연락하세요</string>
<string name="MCA_task_title_no_name">%s 님에게 다시 연락하세요</string>
<string name="MCA_schedule_dialog_title">%s 님에게 다시 연락하세요...</string>
<string name="CRA_ignore">무시하기</string>
<string name="CRA_title">모임 목록이 필요하세요?</string>
<string name="CRA_ignore_title">모든 달력 이벤트를 무시할까요?</string>

@ -121,7 +121,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks zal gemiste oproepen laten zien en een herinnering weergeven om terug te bellen</string>
<string name="MCA_task_title_name">Bel %1$s terug op %2$s</string>
<string name="MCA_task_title_no_name">Bel %s terug</string>
<string name="MCA_schedule_dialog_title">Bel %s terug over...</string>
<string name="CRA_ignore">Negeren</string>
<string name="CRA_title">Heb je een bijeenkomst lijst nodig? </string>
<string name="CRA_ignore_title">Alle agenda gebeurtenissen negeren? </string>

@ -120,7 +120,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks będzie powiadamiał Cię o nieodebranych połączeniach i przypomni Ci o oddzwonieniu.</string>
<string name="MCA_task_title_name">Oddzwoń do %1$s o %2$s</string>
<string name="MCA_task_title_no_name">Oddzwoń do %s</string>
<string name="MCA_schedule_dialog_title">Oddzwoń do %s za...</string>
<string name="CRA_ignore">Ignoruj</string>
<string name="CRA_title">Czy potrzebujesz listy spotkań?</string>
<string name="CRA_ignore_title">Ignorować wszystke wydarzenia w kalendarzu?</string>

@ -119,7 +119,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks notificará sobre chamadas perdidas e oferecerá para lhe lembrar para ligar de volta</string>
<string name="MCA_task_title_name">Retornar ligação de %1$s às %2$s</string>
<string name="MCA_task_title_no_name">Retornar ligação de %s</string>
<string name="MCA_schedule_dialog_title">Retornar ligação de %s em ...</string>
<string name="CRA_ignore">Ignorar</string>
<string name="CRA_title">Precisa de uma lista de reuniões?</string>
<string name="CRA_ignore_title">Ignorar todos os eventos do calendário?</string>

@ -124,7 +124,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">O Tasks irá notificar sobre as chamadas perdidas e lembrar-lhe para fazer as ligações</string>
<string name="MCA_task_title_name">Ligar a %1$s às %2$s</string>
<string name="MCA_task_title_no_name">Ligar a %s</string>
<string name="MCA_schedule_dialog_title">Ligar a %s em...</string>
<string name="CRA_ignore">Ignorar</string>
<string name="CRA_title">Precisa de uma lista de encontros?</string>
<string name="CRA_ignore_title">Ignorar todos os eventos do calendário?</string>

@ -123,7 +123,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks будет уведомлять вас о пропущенных звонках и предложит вам перезвонить</string>
<string name="MCA_task_title_name">Перезвонить %1$s в %2$s</string>
<string name="MCA_task_title_no_name">Перезвонить %s</string>
<string name="MCA_schedule_dialog_title">Перезвонить %s в...</string>
<string name="CRA_ignore">Игнорировать</string>
<string name="CRA_title">Необходим список встреч?</string>
<string name="CRA_ignore_title">Пропустить все события календаря?</string>

@ -123,7 +123,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks ťa upozorní na zmeškané hovory a ponúkne ti pripomienku na zavolanie späť</string>
<string name="MCA_task_title_name">Zavolať %1$s späť o %2$s</string>
<string name="MCA_task_title_no_name">Zavolať %s späť</string>
<string name="MCA_schedule_dialog_title">Zavolať %s späť na...</string>
<string name="CRA_ignore">Ignorovať</string>
<string name="CRA_title">Potrebuješ zoznam na stretnutie?</string>
<string name="CRA_ignore_title">Ignorovať všetky udalosti kalendára?</string>

@ -123,7 +123,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Aplikacija Opravki vas bo obvestila o zgrešenih klicih in ponudila opomnik za vrnitev klicev</string>
<string name="MCA_task_title_name">%1$s pokliči nazaj ob %2$s</string>
<string name="MCA_task_title_no_name">Vrni klic %s </string>
<string name="MCA_schedule_dialog_title">Pokliči nazaj %s čez...</string>
<string name="CRA_ignore">Ignoriraj</string>
<string name="CRA_title">Potrebujete seznam sestankov?</string>
<string name="CRA_ignore_title">Naj ignoriram vse dogodke na koledarju?</string>

@ -120,7 +120,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks meddelar dig om missade samtal och ger dig möjligheten att få påminnelse om att ringa tillbaka</string>
<string name="MCA_task_title_name">Ring %1$s tillbaka kl %2$s</string>
<string name="MCA_task_title_no_name">Ring %s tillbaka</string>
<string name="MCA_schedule_dialog_title">Ring %s tillbaka om...</string>
<string name="CRA_ignore">Ignorera</string>
<string name="CRA_title">Behöver du en lista över möten?</string>
<string name="CRA_ignore_title">Ignorera alla händelser i kalender?</string>

@ -108,7 +108,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks cevapsız çağrıları size bildirecek ve geri aramanız için hatırlatacak</string>
<string name="MCA_task_title_name">%1$s kişisini geri ara: %2$s</string>
<string name="MCA_task_title_no_name">%s kişisini geri ara</string>
<string name="MCA_schedule_dialog_title">%s kişisini geri ara..</string>
<string name="CRA_ignore">Yoksay</string>
<string name="CRA_title">Bir toplantı listesine mi ihtiyacınız var?</string>
<string name="CRA_ignore_title">Tüm takvim etkinlikleri yok sayılsın mı?</string>

@ -123,7 +123,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks буде повідомляти вас про пропущені дзвінки і запропонує вам передзвонити</string>
<string name="MCA_task_title_name">Перетелефонувати %1$s о %2$s</string>
<string name="MCA_task_title_no_name">Перетелефонувати %s </string>
<string name="MCA_schedule_dialog_title">Перетелефонувати %s через...</string>
<string name="CRA_ignore">Ігнорувати</string>
<string name="CRA_title">Потрібен список для зустрічі?</string>
<string name="CRA_ignore_title">Ігнорувати всі події календаря?</string>

@ -108,7 +108,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">清单小助理会向您报告未接电话,还会提供回电的提醒</string>
<string name="MCA_task_title_name">请回电给 %1$s电话是 %2$s</string>
<string name="MCA_task_title_no_name">请回电给 %s</string>
<string name="MCA_schedule_dialog_title">请给 %s 回个电话过去……</string>
<string name="CRA_ignore">忽略</string>
<string name="CRA_title">需要会议列表?</string>
<string name="CRA_ignore_title">忽略所有日历事件?</string>

@ -118,7 +118,6 @@
<string name="MCA_missed_calls_pref_desc_enabled">Tasks 會向您報告未接電話,還會提供回電的提醒</string>
<string name="MCA_task_title_name">請回電給 %1$s電話是 %2$s</string>
<string name="MCA_task_title_no_name">請回電給 %s</string>
<string name="MCA_schedule_dialog_title">請給 %s 回個電話過去……</string>
<string name="CRA_ignore">忽略</string>
<string name="CRA_title">需要一個會議列表嗎?</string>
<string name="CRA_ignore_title">要忽略所有月曆上的事件嗎?</string>

@ -271,9 +271,6 @@
<!-- Missed call: task title no name (%s -> number)-->
<string name="MCA_task_title_no_name">Call %s back</string>
<!-- Missed call: schedule dialog title (%s -> name or number)-->
<string name="MCA_schedule_dialog_title">Call %s back in...</string>
<!-- ======================================= Calendar reminder activity == -->
<!-- Calendar remindeer ignore button -->

Loading…
Cancel
Save