mirror of
https://github.com/etesync/android
synced 2025-02-02 19:01:06 +00:00
Event invites: Warn about clients that don't support email attachments
This commit is contained in:
parent
09ee9a2bd1
commit
0cda396d20
@ -5,6 +5,8 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.net.Uri
|
||||
import android.view.Gravity
|
||||
import android.widget.Toast
|
||||
import at.bitfire.ical4android.Event
|
||||
import com.etesync.syncadapter.App
|
||||
import com.etesync.syncadapter.R
|
||||
@ -52,6 +54,12 @@ class EventEmailInvitation constructor(val context: Context, val account: Accoun
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
intent.putExtra(Intent.EXTRA_STREAM, uri)
|
||||
|
||||
if (!emailSupportsAttachments(context)) {
|
||||
val toast = Toast.makeText(context, context.getString(R.string.calendar_attendees_email_no_attachment), Toast.LENGTH_LONG)
|
||||
toast.setGravity(Gravity.CENTER, 0, 0)
|
||||
toast.show()
|
||||
}
|
||||
|
||||
return intent
|
||||
}
|
||||
|
||||
|
@ -351,6 +351,7 @@
|
||||
<string name="calendar_attendees_send_email_action">Send invitations</string>
|
||||
<string name="sync_calendar_attendees_email_subject" formatted="false">Invitation: %s @ %s</string>
|
||||
<string name="sync_calendar_attendees_email_content" formatted="false">You have been invited to the following event:\n\n%s\nWhen: %s\nWhere: %s\nAttendees: %s\n\n--\nThis email was created by EteSync.\nSecure, end-to-end encrypted and privacy respecting data sync.</string>
|
||||
<string name="calendar_attendees_email_no_attachment">Your email client does not support file attachments. Please contact its developers to fix it!</string>
|
||||
|
||||
<!-- cert4android -->
|
||||
<string name="certificate_notification_connection_security">EteSync: Connection security</string>
|
||||
|
Loading…
Reference in New Issue
Block a user