diff options
author | Allan Wang <me@allanwang.ca> | 2017-08-07 14:56:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-07 14:56:48 -0700 |
commit | ab7ec131b62ac1567e983c846c921bd3ada11dd4 (patch) | |
tree | 1e9e7db2151ba531f438a2ac9c4fc960c913dc46 /app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt | |
parent | 7746e63373c905faa6d7e45e45fffc48d3ffff85 (diff) | |
download | frost-ab7ec131b62ac1567e983c846c921bd3ada11dd4.tar.gz frost-ab7ec131b62ac1567e983c846c921bd3ada11dd4.tar.bz2 frost-ab7ec131b62ac1567e983c846c921bd3ada11dd4.zip |
Fix/2FA (#115)
* Create basis for downloading videos
* Resolve some download errors and allow video to be opened in external apps
* Remove url checks for loging
* Update readme with build links
* Allow for all apks to build
* Fix travis apk uploads
* Fix null mapping
* Fix some notation
* Add commit message to test builds
* Remove faulty commit from test release
* Add intent overriding to login web client
* Add resource logging
* Add intent verification without url check
* Simplify login activity
* Check start activity for result
* Add check before resolving intent
* Fix wrong index
* Temporary fix for 2FA login with U2F (#116)
* Clean up and add comments
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt index d9b91225..2453d3b0 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt @@ -22,7 +22,7 @@ import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.FrostWebActivity import com.pitchedapps.frost.dbflow.CookieModel import com.pitchedapps.frost.dbflow.fetchUsername -import com.pitchedapps.frost.facebook.FB_URL_BASE +import com.pitchedapps.frost.facebook.formattedFbUrl import com.pitchedapps.frost.utils.ARG_USER_ID import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.Prefs @@ -40,7 +40,7 @@ val Context.frostNotification: NotificationCompat.Builder } @Suppress("DEPRECATION") -//The update feature is for Android O and seems to still be in beta + //The update feature is for Android O and seems to still be in beta fun Notification.frostConfig() = apply { if (Prefs.notificationVibrate) defaults = defaults or Notification.DEFAULT_VIBRATE if (Prefs.notificationSound) defaults = defaults or Notification.DEFAULT_SOUND @@ -86,12 +86,12 @@ data class NotificationContent(val data: CookieModel, } } else { val intent = Intent(context, FrostWebActivity::class.java) - intent.data = Uri.parse("${FB_URL_BASE}$href") + intent.data = Uri.parse(href.formattedFbUrl) intent.putExtra(ARG_USER_ID, data.id) val group = "frost_${data.id}" val pendingIntent = PendingIntent.getActivity(context, 0, intent, 0) val notifBuilder = context.frostNotification - .setContentTitle(title ?: context.string(R.string.app_name)) + .setContentTitle(title ?: context.string(R.string.frost_name)) .setContentText(text) .setContentIntent(pendingIntent) .setCategory(Notification.CATEGORY_SOCIAL) |