aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/build.gradle38
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt14
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt5
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt4
-rw-r--r--app/src/main/res/layout/activity_frame_wrapper.xml4
-rw-r--r--app/src/main/res/layout/activity_tab_customizer.xml4
9 files changed, 31 insertions, 48 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 83590b78..3b913a82 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,27 +1,8 @@
-plugins {
- id 'com.gladed.androidgitversion' version '0.4.3'
-}
-
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
-apply plugin: 'com.github.triplet.play'
apply plugin: 'com.getkeepsafe.dexcount'
-
-def withPlaySigning = file('../files/gplay-keys.json').exists()
-/*
- * Feel free to check the gitignore under the files/ folder to see what is required for the signing
- * It is assumed that if one of those files exist, all remaining ones exist as well
- */
-
-if (withPlaySigning)
- play {
- jsonFile = file('../files/gplay-keys.json')
- track = 'alpha'
- errorOnSizeLimit = true
- uploadImages = false
- untrackOld = true
- }
+apply plugin: 'com.gladed.androidgitversion'
android {
compileSdkVersion kau.targetSdk
@@ -64,18 +45,6 @@ android {
signingConfigs {
- if (withPlaySigning) {
- def releaseProps = new Properties()
- file("../files/play.properties").withInputStream { releaseProps.load(it) }
-
- release {
- storeFile file("../files/play.keystore")
- storePassword releaseProps.getProperty('storePassword')
- keyAlias releaseProps.getProperty('keyAlias')
- keyPassword releaseProps.getProperty('keyPassword')
- }
- }
-
debug {
storeFile file("../files/debug.keystore")
storePassword "debugKey"
@@ -89,6 +58,7 @@ android {
keyAlias "testKey"
keyPassword "testkey"
}
+
}
buildTypes {
@@ -116,7 +86,6 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- if (withPlaySigning) signingConfig signingConfigs.release
resValue "string", "frost_name", "Frost"
resValue "string", "frost_web", "Frost Web"
}
@@ -137,7 +106,6 @@ repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
- maven { url 'https://maven.fabric.io/public' }
}
dependencies {
@@ -178,7 +146,9 @@ dependencies {
implementation"com.mikepenz:fastadapter-extensions:${kau.fastAdapter}@aar"
+ //noinspection GradleDependency
implementation "com.github.bumptech.glide:okhttp3-integration:${kau.glide}"
+ //noinspection GradleDependency
kapt "com.github.bumptech.glide:compiler:${kau.glide}"
implementation "com.fasterxml.jackson.core:jackson-databind:2.9.3"
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
index 118f7eac..cbb3d0ab 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
@@ -68,10 +68,18 @@ class FrostApp : Application() {
// refWatcher = LeakCanary.install(this)
if (!BuildConfig.DEBUG) {
Bugsnag.init(this)
- Bugsnag.setAutoCaptureSessions(true)
- Bugsnag.getClient().setUserId(Prefs.frostId)
+ val releaseStage = setOf("production", "releaseTest", "github", "release")
+ Bugsnag.setNotifyReleaseStages(*releaseStage.toTypedArray(), "unnamed")
+ val versionSegments = BuildConfig.VERSION_NAME.split("_")
+ if (versionSegments.size > 1) {
+ Bugsnag.setAppVersion(versionSegments.first())
+ Bugsnag.setReleaseStage(if (versionSegments.last() in releaseStage) versionSegments.last()
+ else "unnamed")
+ Bugsnag.setUserName(BuildConfig.VERSION_NAME)
+ }
-// setUser("userId", "user@email.com", "User Name")
+ Bugsnag.setAutoCaptureSessions(true)
+ Bugsnag.setUserId(Prefs.frostId)
}
KL.shouldLog = { BuildConfig.DEBUG }
Prefs.verboseLogging = false
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt
index 21bc2354..0cd7dacd 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt
@@ -52,7 +52,7 @@ import com.pitchedapps.frost.dbflow.loadFbTabs
import com.pitchedapps.frost.enums.MainActivityLayout
import com.pitchedapps.frost.facebook.FbCookie
import com.pitchedapps.frost.facebook.FbItem
-import com.pitchedapps.frost.facebook.PROFILE_PICTURE_URL
+import com.pitchedapps.frost.facebook.profilePictureUrl
import com.pitchedapps.frost.fragments.BaseFragment
import com.pitchedapps.frost.fragments.WebFragment
import com.pitchedapps.frost.parsers.FrostSearch
@@ -191,7 +191,7 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract,
selectionSecondLineShown = false
cookies().forEach { (id, name) ->
profile(name = name ?: "") {
- iconUrl = PROFILE_PICTURE_URL(id)
+ iconUrl = profilePictureUrl(id)
textColor = Prefs.textColor.toLong()
selectedTextColor = Prefs.textColor.toLong()
selectedColor = 0x00000001.toLong()
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt
index 7e989fc6..dd0649b3 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt
@@ -20,7 +20,7 @@ import com.pitchedapps.frost.dbflow.CookieModel
import com.pitchedapps.frost.dbflow.fetchUsername
import com.pitchedapps.frost.dbflow.loadFbCookiesAsync
import com.pitchedapps.frost.facebook.FbCookie
-import com.pitchedapps.frost.facebook.PROFILE_PICTURE_URL
+import com.pitchedapps.frost.facebook.profilePictureUrl
import com.pitchedapps.frost.glide.FrostGlide
import com.pitchedapps.frost.glide.GlideApp
import com.pitchedapps.frost.glide.transform
@@ -110,7 +110,7 @@ class LoginActivity : BaseActivity() {
private fun loadProfile(id: Long) {
- profileLoader.load(PROFILE_PICTURE_URL(id))
+ profileLoader.load(profilePictureUrl(id))
.transform(FrostGlide.roundCorner).listener(object : RequestListener<Drawable> {
override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {
profileSubject.onSuccess(true)
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt
index 4f37c6c7..f93a2229 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt
@@ -54,7 +54,7 @@ enum class OverlayContext(private val menuItem: FrostMenuItem?) : EnumBundle<Ove
class FrostMenuItem(
val id: Int,
val fbItem: FbItem,
- val showAsAction: Int = MenuItem.SHOW_AS_ACTION_ALWAYS) {
+ val showAsAction: Int = MenuItem.SHOW_AS_ACTION_IF_ROOM) {
fun addToMenu(context: Context, menu: Menu, index: Int) {
val item = menu.add(Menu.NONE, id, index, fbItem.titleId)
item.icon = fbItem.icon.toDrawable(context, 18)
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
index 6456b0d6..33f6ebe4 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
@@ -8,12 +8,13 @@ const val FACEBOOK_COM = "facebook.com"
const val FBCDN_NET = "fbcdn.net"
const val HTTPS_FACEBOOK_COM = "https://$FACEBOOK_COM"
const val FB_URL_BASE = "https://m.$FACEBOOK_COM/"
-fun PROFILE_PICTURE_URL(id: Long) = "https://graph.facebook.com/$id/picture?type=large"
+fun profilePictureUrl(id: Long) = "https://graph.facebook.com/$id/picture?type=large"
const val FB_LOGIN_URL = "${FB_URL_BASE}login"
const val USER_AGENT_FULL = "Mozilla/5.0 (Linux; Android 4.4.2; en-us; SAMSUNG SM-G900T Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.6 Chrome/28.0.1500.94 Mobile Safari/537.36"
-const val USER_AGENT_BASIC = "Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.1.0.4633 Mobile Safari/537.10+"
+const val USER_AGENT_BASIC_OLD = "Mozilla/5.0 (Linux; Android 6.0) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.1.0.4633 Mobile Safari/537.10+"
const val USER_AGENT_MESSENGER = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
+const val USER_AGENT_BASIC = USER_AGENT_MESSENGER
/**
* Animation transition delay, just to ensure that the styles
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt
index 7058ffe4..7262fa17 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt
@@ -14,7 +14,7 @@ import com.bumptech.glide.request.target.Target
import com.mikepenz.google_material_typeface_library.GoogleMaterial
import com.pitchedapps.frost.R
import com.pitchedapps.frost.dbflow.CookieModel
-import com.pitchedapps.frost.facebook.PROFILE_PICTURE_URL
+import com.pitchedapps.frost.facebook.profilePictureUrl
import com.pitchedapps.frost.glide.FrostGlide
import com.pitchedapps.frost.glide.GlideApp
import com.pitchedapps.frost.utils.Prefs
@@ -32,7 +32,7 @@ class AccountItem(val cookie: CookieModel?) : KauIItem<AccountItem, AccountItem.
text.setTextColor(Prefs.textColor)
if (cookie != null) {
text.text = cookie.name
- GlideApp.with(itemView).load(PROFILE_PICTURE_URL(cookie.id))
+ GlideApp.with(itemView).load(profilePictureUrl(cookie.id))
.transform(FrostGlide.roundCorner).listener(object : RequestListener<Drawable> {
override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {
text.fadeIn()
diff --git a/app/src/main/res/layout/activity_frame_wrapper.xml b/app/src/main/res/layout/activity_frame_wrapper.xml
index e51d3391..8d625933 100644
--- a/app/src/main/res/layout/activity_frame_wrapper.xml
+++ b/app/src/main/res/layout/activity_frame_wrapper.xml
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/frame_wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:fitsSystemWindows="true" /> \ No newline at end of file
+ android:fitsSystemWindows="true"
+ tools:ignore="MergeRootFrame" /> \ No newline at end of file
diff --git a/app/src/main/res/layout/activity_tab_customizer.xml b/app/src/main/res/layout/activity_tab_customizer.xml
index b72bb953..8e540f11 100644
--- a/app/src/main/res/layout/activity_tab_customizer.xml
+++ b/app/src/main/res/layout/activity_tab_customizer.xml
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ xmlns:tools="http://schemas.android.com/tools"
+ tools:ignore="MergeRootFrame">
<View
android:id="@+id/pseudo_toolbar"