1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-08 20:12:39 +01:00

Merge branch 'dev' into feed-options

This commit is contained in:
Allan Wang 2020-10-03 20:02:02 -07:00
commit 64116d82b1
No known key found for this signature in database
GPG Key ID: C93E3F9C679D7A56
13 changed files with 37 additions and 39 deletions

View File

@ -25,17 +25,8 @@
android:supportsRtl="true"
android:theme="@style/FrostTheme"
android:usesCleartextTraffic="true"
android:requestLegacyExternalStorage="true"
tools:ignore="UnusedAttribute">
<!-- Matches general label under NotificationUtils.kt -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="general" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/facebook_blue" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/frost_f_24" />
<activity
android:name=".StartActivity"

View File

@ -135,19 +135,19 @@ class FrostApp : Application(), KoinComponent {
val config = Configuration("83cf680ed01a6fda10fe497d1c0962bb").apply {
appVersion = version.versionName
releaseStage = BuildUtils.getStage(BuildConfig.BUILD_TYPE)
notifyReleaseStages = BuildUtils.getAllStages()
autoCaptureSessions = prefs.analytics
enableExceptionHandler = prefs.analytics
enabledReleaseStages = BuildUtils.getAllStages()
autoTrackSessions = prefs.analytics
autoDetectErrors = prefs.analytics
}
Bugsnag.init(this, config)
Bugsnag.start(this, config)
L.hasAnalytics = { prefs.analytics }
Bugsnag.setUserId(prefs.frostId)
Bugsnag.addToTab("Build", "Application", BuildConfig.APPLICATION_ID)
Bugsnag.addToTab("Build", "Version", BuildConfig.VERSION_NAME)
Bugsnag.setUser(prefs.frostId, null, null)
Bugsnag.addMetadata("Build", "Application", BuildConfig.APPLICATION_ID)
Bugsnag.addMetadata("Build", "Version", BuildConfig.VERSION_NAME)
Bugsnag.beforeNotify { error ->
Bugsnag.addOnError { event ->
when {
error.exception.stackTrace.any { it.className.contains("XposedBridge") } -> false
event.originalError?.stackTrace?.any { it.className.contains("XposedBridge") } == true -> false
else -> true
}
}

View File

@ -178,10 +178,11 @@ class AboutActivity : AboutActivityBase(null) {
arrayOf(R.drawable.ic_fdroid_24 to { c.startLink(R.string.fdroid_url) })
val iicons: Array<Pair<IIcon, () -> Unit>> = arrayOf(
GoogleMaterial.Icon.gmd_file_download to { c.startLink(R.string.github_downloads_url) },
CommunityMaterial.Icon2.cmd_reddit to { c.startLink(R.string.reddit_url) },
CommunityMaterial.Icon.cmd_github_circle to { c.startLink(R.string.github_url) },
CommunityMaterial.Icon2.cmd_slack to { c.startLink(R.string.slack_url) },
CommunityMaterial.Icon2.cmd_xda to { c.startLink(R.string.xda_url) })
CommunityMaterial.Icon3.cmd_reddit to { c.startLink(R.string.reddit_url) },
CommunityMaterial.Icon2.cmd_github to { c.startLink(R.string.github_url) },
CommunityMaterial.Icon3.cmd_slack to { c.startLink(R.string.slack_url) }
// CommunityMaterial.Icon3.cmd_xda to { c.startLink(R.string.xda_url) }, // TODO add back?
)
images =
(icons.map { (icon, onClick) -> c.drawable(icon) to onClick } + iicons.map { (icon, onClick) ->

View File

@ -153,7 +153,7 @@ class SettingsActivity : KPrefActivity() {
subItems(R.string.newsfeed, getFeedPrefs()) {
descRes = R.string.newsfeed_desc
iicon = CommunityMaterial.Icon2.cmd_newspaper
iicon = CommunityMaterial.Icon3.cmd_newspaper
}
subItems(R.string.notifications, getNotificationPrefs()) {
@ -196,7 +196,7 @@ class SettingsActivity : KPrefActivity() {
subItems(R.string.experimental, getExperimentalPrefs()) {
descRes = R.string.experimental_desc
iicon = CommunityMaterial.Icon.cmd_flask_outline
iicon = CommunityMaterial.Icon2.cmd_flask_outline
}
subItems(R.string.debug_frost, getDebugPrefs()) {

View File

@ -40,7 +40,7 @@ enum class FbItem(
BIRTHDAYS(R.string.birthdays, GoogleMaterial.Icon.gmd_cake, "events/birthdays"),
CHAT(R.string.chat, GoogleMaterial.Icon.gmd_chat, "buddylist"),
EVENTS(R.string.events, GoogleMaterial.Icon.gmd_event_note, "events/upcoming"),
FEED(R.string.feed, CommunityMaterial.Icon2.cmd_newspaper, ""),
FEED(R.string.feed, CommunityMaterial.Icon3.cmd_newspaper, ""),
FEED_MOST_RECENT(R.string.most_recent, GoogleMaterial.Icon.gmd_history, "home.php?sk=h_chr"),
FEED_TOP_STORIES(R.string.top_stories, GoogleMaterial.Icon.gmd_star, "home.php?sk=h_nor"),
FRIENDS(R.string.friends, GoogleMaterial.Icon.gmd_person_add, "friends/center/requests"),
@ -48,7 +48,7 @@ enum class FbItem(
MARKETPLACE(R.string.marketplace, GoogleMaterial.Icon.gmd_store, "marketplace"),
MENU(R.string.menu, GoogleMaterial.Icon.gmd_menu, "settings"),
MESSAGES(R.string.messages, MaterialDesignIconic.Icon.gmi_comments, "messages"),
NOTES(R.string.notes, CommunityMaterial.Icon2.cmd_note, "notes"),
NOTES(R.string.notes, CommunityMaterial.Icon3.cmd_note, "notes"),
NOTIFICATIONS(R.string.notifications, MaterialDesignIconic.Icon.gmi_globe, "notifications"),
ON_THIS_DAY(R.string.on_this_day, GoogleMaterial.Icon.gmd_today, "onthisday"),
PAGES(R.string.pages, GoogleMaterial.Icon.gmd_flag, "pages"),

View File

@ -33,8 +33,8 @@ object BuildUtils {
return Data("v${result[1]}", result[2])
}
fun getAllStages(): Array<String> =
arrayOf(BUILD_PRODUCTION, BUILD_TEST, BUILD_GITHUB, BUILD_RELEASE, BUILD_UNNAMED)
fun getAllStages(): Set<String> =
setOf(BUILD_PRODUCTION, BUILD_TEST, BUILD_GITHUB, BUILD_RELEASE, BUILD_UNNAMED)
fun getStage(build: String): String = build.takeIf { it in getAllStages() } ?: BUILD_UNNAMED
}

View File

@ -22,7 +22,8 @@
android:id="@id/intro_image"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="@dimen/kau_padding_large"
android:layout_marginStart="@dimen/kau_padding_large"
android:layout_marginEnd="@dimen/kau_padding_large"
android:scaleType="fitCenter"
app:layout_constraintBottom_toTopOf="@id/intro_desc"
app:layout_constraintEnd_toEndOf="parent"
@ -46,7 +47,7 @@
style="@style/IntroSubTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lines="3"
android:lines="4"
android:padding="@dimen/kau_padding_large"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -50,13 +50,13 @@ html, body, :root, #root, #header, #MComposer, ._1upc, input, ._2f9r, ._59e9, ._
}
.jewel, .flyout, ._52z5, ._13e_, ._5-lw, ._5c0e, .jx-result, ._336p, .mentions-suggest-item, ._2suk, ._-j7, ._4d0v, ._4d0m,
.mentions-suggest, ._1xoz, ._1xow,
.mentions-suggest, ._1xoz, ._1xow, ._14v5 ._14v8,
// desktop sharing page
.uiBoxLightblue, .uiBoxWhite, .uiBoxGray, .uiTokenizer, .uiTypeahead, ._558b ._54ng, ._2_bh, ._509o, ._509o:hover {
background: $bg_opaque !important;
}
._403n, ._14v5 ._14v8, ._1-kc {
._403n, ._1-kc {
background: $bg_opaque2 !important;
}
@ -70,7 +70,7 @@ button:not([style*=image]):not(.privacyButtons), button::before, .touch ._56bt,
._10sb li.selected, ._2z4j, ._ib-, ._1bhl, ._5a5j, ._6--d, ._77p7,
._2b06, ._2tsf, ._3gka, .mCount, ._27vc, ._4pv-, ._6pk5, ._86nt,
._4qax, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, ._z-w, ._t21, .mToken,
#addMembersTypeahead .mToken.mTokenWeakReference,
#addMembersTypeahead .mToken.mTokenWeakReference, ._4_d0 ._8-89,
.acbk {
background: $background2 !important;
}

View File

@ -99,3 +99,8 @@
._484w.selected ._6zf, ._7gxa, ._2wn2 {
border-bottom: 2px solid $accent !important;
}
// Small face previews
.facepile .facepileItem.facepileItemOverLapped .facepileItemRound, .facepile .facepileItem.facepileItemOverLapped.facepileItemRound, .facepile .facepileItem.facepileItemOverLapped .facepileMoreDotsRound {
border: 2px solid $bg_opaque2 !important;
}

View File

@ -13,7 +13,7 @@ html, body, input, ._42rv, ._4qau, ._dwm .descArea, ._eu5,
textarea:not([style*="color: rgb"]), ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782,
._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._6--d, ._77p7, ._7h_g,
._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._38d-, ._3n8y, ._38dt, ._3oyg, ._21dc,
.uiStickyPlaceholderInput .placeholder, .mTypeahead span,
.uiStickyPlaceholderInput .placeholder, .mTypeahead span, ._4_d0 ._8-8a,
._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._6xqt, ._7cui, ._84lx [style*="color: rgb"],
._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._7cdj, ._1_yd, ._1_yc,
._2new, .appCenterCategorySelectorButton, ._1ksq, ._1kt6, ._6ber, ._mxb, ._3oyd, ._3gir, ._3gis,

View File

@ -14,11 +14,11 @@ object Versions {
// https://github.com/jhy/jsoup/releases
const val jsoup = "1.13.1"
// https://square.github.io/okhttp/changelog/
const val okhttp = "4.7.2"
const val okhttp = "4.9.0"
// https://developer.android.com/jetpack/androidx/releases/room
const val room = "2.2.5"
// http://robolectric.org/getting-started/
const val roboelectric = "4.3"
const val roboelectric = "4.4"
// https://github.com/davemorrissey/subsampling-scale-image-view#quick-start
const val scaleImageView = "3.10.0"
// https://github.com/node-gradle/gradle-node-plugin/releases

View File

@ -16,7 +16,7 @@ org.gradle.daemon = true
APP_ID=Frost
APP_GROUP=com.pitchedapps
KAU=c01c9d5
KAU=61eeb7b
android.useAndroidX=true
android.enableJetifier=true

View File

@ -1,4 +1,4 @@
apply plugin: "com.diffplug.gradle.spotless"
apply plugin: "com.diffplug.spotless"
spotless {
kotlin {