remove the event reminder timer from ics import dialog
This commit is contained in:
parent
9ee0b764e6
commit
48de60188f
|
@ -4,8 +4,6 @@ import android.app.Activity
|
|||
import android.support.v7.app.AlertDialog
|
||||
import android.view.LayoutInflater
|
||||
import com.simplemobiletools.calendar.R
|
||||
import com.simplemobiletools.calendar.extensions.config
|
||||
import com.simplemobiletools.calendar.extensions.getReminderText
|
||||
import com.simplemobiletools.calendar.helpers.IcsParser
|
||||
import com.simplemobiletools.calendar.helpers.IcsParser.ImportResult.*
|
||||
import com.simplemobiletools.commons.extensions.humanizePath
|
||||
|
@ -14,20 +12,10 @@ import com.simplemobiletools.commons.extensions.toast
|
|||
import kotlinx.android.synthetic.main.dialog_import_events.view.*
|
||||
|
||||
class ImportEventsDialog(val activity: Activity, val path: String, val callback: (refreshView: Boolean) -> Unit) : AlertDialog.Builder(activity) {
|
||||
var reminderMinutes = 0
|
||||
|
||||
init {
|
||||
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_import_events, null).apply {
|
||||
reminderMinutes = activity.config.defaultReminderMinutes
|
||||
import_events_filename.text = activity.humanizePath(path)
|
||||
import_events_reminder.text = activity.getReminderText(reminderMinutes)
|
||||
|
||||
import_events_reminder.setOnClickListener {
|
||||
EventReminderDialog(activity, reminderMinutes) {
|
||||
reminderMinutes = it
|
||||
import_events_reminder.text = activity.getReminderText(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
|
@ -37,7 +25,7 @@ class ImportEventsDialog(val activity: Activity, val path: String, val callback:
|
|||
activity.setupDialogStuff(view, this, R.string.import_events)
|
||||
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener({
|
||||
Thread({
|
||||
val result = IcsParser().parseIcs(context, reminderMinutes, path)
|
||||
val result = IcsParser().parseIcs(context, path)
|
||||
handleParseResult(result)
|
||||
dismiss()
|
||||
}).start()
|
||||
|
|
|
@ -38,7 +38,7 @@ class IcsParser {
|
|||
var eventsImported = 0
|
||||
var eventsFailed = 0
|
||||
|
||||
fun parseIcs(context: Context, reminderMinutes: Int, path: String): ImportResult {
|
||||
fun parseIcs(context: Context, path: String): ImportResult {
|
||||
try {
|
||||
val dbHelper = DBHelper.newInstance(context)
|
||||
val importIDs = dbHelper.getImportIds()
|
||||
|
|
|
@ -26,19 +26,4 @@
|
|||
android:paddingRight="@dimen/small_margin"
|
||||
android:paddingTop="@dimen/small_margin"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/import_events_reminder_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/event_reminder"
|
||||
android:textSize="@dimen/smaller_text_size"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/import_events_reminder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/small_margin"
|
||||
android:layout_marginRight="@dimen/small_margin"
|
||||
android:padding="@dimen/normal_margin"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Import events</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">Event reminder</string>
|
||||
<string name="events_imported_successfully">Events imported successfully</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">importiere Termine</string>
|
||||
<string name="import_events_from_ics">importiere Termine aus.ics Datei</string>
|
||||
<string name="event_reminder">Termin Erinnerung</string>
|
||||
<string name="events_imported_successfully">Termine erfolgreich importiert</string>
|
||||
<string name="importing_events_failed">Termine importieren fehlgeschlagen</string>
|
||||
<string name="importing_some_events_failed">einige Termine wurden nicht erfolgreich importiert</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Import events</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">Event reminder</string>
|
||||
<string name="events_imported_successfully">Events imported successfully</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Import events</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">Event reminder</string>
|
||||
<string name="events_imported_successfully">Events imported successfully</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Import events</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">Event reminder</string>
|
||||
<string name="events_imported_successfully">Events imported successfully</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Import events</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">Event reminder</string>
|
||||
<string name="events_imported_successfully">Events imported successfully</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Import events</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">Event reminder</string>
|
||||
<string name="events_imported_successfully">Events imported successfully</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Import events</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">Event reminder</string>
|
||||
<string name="events_imported_successfully">Events imported successfully</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">ייבוא אירועים</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">תזכורת לאירוע</string>
|
||||
<string name="events_imported_successfully">האירועים יובאו בהצלחה</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Import events</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">Event reminder</string>
|
||||
<string name="events_imported_successfully">Events imported successfully</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Importar eventos</string>
|
||||
<string name="import_events_from_ics">Importar eventos de um ficheiro .ics</string>
|
||||
<string name="event_reminder">Lembrete de eventos</string>
|
||||
<string name="events_imported_successfully">Eventos importados com sucesso</string>
|
||||
<string name="importing_events_failed">Falha de importação</string>
|
||||
<string name="importing_some_events_failed">Alguns eventos não foram importados</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Импорт событий</string>
|
||||
<string name="import_events_from_ics">Импорт событий из .ics файла</string>
|
||||
<string name="event_reminder">Напоминания о событиях</string>
|
||||
<string name="events_imported_successfully">События успешно импортированы</string>
|
||||
<string name="importing_events_failed">Импорт событий не удался</string>
|
||||
<string name="importing_some_events_failed">Ошибка импорта</string>
|
||||
|
|
|
@ -98,7 +98,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Importovať udalosti</string>
|
||||
<string name="import_events_from_ics">Importovať udalosti z .ics súboru</string>
|
||||
<string name="event_reminder">Pripomienka udalosti</string>
|
||||
<string name="events_imported_successfully">Udalosti boli úspešne importované</string>
|
||||
<string name="importing_events_failed">Importovanie udalostí zlyhalo</string>
|
||||
<string name="importing_some_events_failed">Importovanie niektorých udalostí zlyhalo</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Import events</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">Event reminder</string>
|
||||
<string name="events_imported_successfully">Events imported successfully</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<!-- Importing -->
|
||||
<string name="import_events">Import events</string>
|
||||
<string name="import_events_from_ics">Import events from an .ics file</string>
|
||||
<string name="event_reminder">Event reminder</string>
|
||||
<string name="events_imported_successfully">Events imported successfully</string>
|
||||
<string name="importing_events_failed">Importing events failed</string>
|
||||
<string name="importing_some_events_failed">Importing some events failed</string>
|
||||
|
|
Loading…
Reference in New Issue