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

Update/kau (#476)

* Update all dependencies

* Revert to working build

* Update kau again

* Update nullables

* Update more nullables

* Inline some things

* Add images to readme

* Update readme translators
This commit is contained in:
Allan Wang 2017-11-09 01:54:12 -05:00 committed by GitHub
parent fc4a018d48
commit e1c12f7716
15 changed files with 49 additions and 31 deletions

View File

@ -28,17 +28,29 @@ Note that these builds occur for every commit, including unstable ones.
You can find the release numbers for the master branch under the [Travis](https://travis-ci.org/AllanWang/Frost-for-Facebook/branches).
Those builds are likely more stable as they are pushed out to the alpha stream on the play store.
## Showcase
![Transparency](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/frost/screenshots/thumbnails/frost_themes.png) 
![Transparency](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/frost/screenshots/thumbnails/frost_glass.png)
![Transparency](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/frost/screenshots/thumbnails/frost_multi_accounts.png) 
![Transparency](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/frost/screenshots/thumbnails/frost_swipe.png)
![Transparency](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/frost/screenshots/thumbnails/frost_quick_links.png) 
## Translations
Frost depends on translations crowdsourced by the general public.
If you would like to contribute, please visit [here](https://crwd.in/frost-for-facebook)
Note that this project heavily depends on [KAU](https://github.com/AllanWang/KAU), which also needs to be translated [here](https://crwd.in/kotlin-android-utils)
Special thanks to the following awesome people for translating significant portions of Frost!
* [Vincent Kulak](https://github.com/VonOx) [FR]
* [Jean-Philippe Gravel](https://crowdin.com/profile/wokija) [FR]
* [Jahir Fiquitiva](https://jahirfiquitiva.me/) [ES]
* [Nefi Salazar](https://plus.google.com/u/0/105547968033551087431) [ES]
* [Bushido1992](https://forum.xda-developers.com/member.php?u=5179246) [DE]
| Language | Contributors |
|----------|--------------|
| French | [Vincent Kulak](https://github.com/VonOx) • [Jean-Philippe Gravel](https://crowdin.com/profile/wokija) |
| German | [Bushido1992](https://forum.xda-developers.com/member.php?u=5179246) • [Marcel Soehnchen](https://crowdin.com/profile/msoehnchen) • [3LD0mi HA](https://forum.xda-developers.com/member.php?u=5860523) |
| Spanish | [Jahir Fiquitiva](https://jahirfiquitiva.me/) • [Nefi Salazar](https://plus.google.com/u/0/105547968033551087431)|
The full activity stream for the translations can be found [here](https://crowdin.com/project/frost-for-facebook/activity_stream)

View File

@ -55,6 +55,10 @@ android {
'UnusedResources',
'ContentDescription',
'RtlSymmetry'
xmlReport false
textReport true
textOutput 'stdout'
}
signingConfigs {

View File

@ -73,8 +73,8 @@ class AboutActivity : AboutActivityBase(null, {
*/
val frost = Library().apply {
libraryName = string(R.string.frost_name)
author = "Pitched Apps"
libraryWebsite = "https://github.com/AllanWang/Frost-for-Facebook"
author = string(R.string.dev_name)
libraryWebsite = string(R.string.github_url)
isOpenSource = true
libraryDescription = string(R.string.frost_description)
libraryVersion = BuildConfig.VERSION_NAME
@ -109,7 +109,7 @@ class AboutActivity : AboutActivityBase(null, {
override fun getLayoutRes(): Int = R.layout.item_about_links
override fun bindView(holder: ViewHolder, payloads: MutableList<Any>?) {
override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) {
super.bindView(holder, payloads)
with(holder) {
bindIconColor(*images.toTypedArray())

View File

@ -453,7 +453,7 @@ class MainActivity : BaseActivity(),
super.onBackPressed()
}
val currentFragment
inline val currentFragment
get() = supportFragmentManager.findFragmentByTag("android:switcher:${R.id.container}:${viewPager.currentItem}") as WebFragment
inner class SectionsPagerAdapter(fm: FragmentManager, val pages: List<FbItem>) : FragmentPagerAdapter(fm) {

View File

@ -105,6 +105,7 @@ class SettingsActivity : KPrefActivity(), FrostBilling by IabSettings() {
plainText(R.string.get_pro) {
descRes = R.string.get_pro_desc
iicon = GoogleMaterial.Icon.gmd_star
visible = { !IS_FROST_PRO }
onClick = { _, _, _ -> restorePurchases(); true }
}

View File

@ -102,16 +102,16 @@ open class WebOverlayActivityBase(private val forceBasicAgent: Boolean) : KauBas
val frostWeb: FrostWebView by bindView(R.id.overlay_frost_webview)
val coordinator: CoordinatorLayout by bindView(R.id.overlay_main_content)
val urlTest: String?
inline val urlTest: String?
get() = intent.extras?.getString(ARG_URL) ?: intent.dataString
open val url: String
get() = (intent.extras?.getString(ARG_URL) ?: intent.dataString).formattedFbUrl
val userId: Long
inline val userId: Long
get() = intent.extras?.getLong(ARG_USER_ID, Prefs.userId) ?: Prefs.userId
val overlayContext: OverlayContext?
inline val overlayContext: OverlayContext?
get() = intent.extras?.getSerializable(ARG_OVERLAY_CONTEXT) as OverlayContext?
override fun onCreate(savedInstanceState: Bundle?) {

View File

@ -20,7 +20,7 @@ import io.reactivex.subjects.SingleSubject
*/
object FbCookie {
val webCookie: String?
inline val webCookie: String?
get() = CookieManager.getInstance().getCookie(FB_URL_BASE)
private fun setWebCookie(cookie: String?, callback: (() -> Unit)?) {

View File

@ -42,9 +42,9 @@ class WebFragment : Fragment() {
// val refresh: SwipeRefreshLayout by lazy { frostWebView.refresh }
val web: FrostWebViewCore by lazy { frostWebView.web }
val url: String by lazy { arguments.getString(ARG_URL) }
val urlEnum: FbItem by lazy { arguments.getSerializable(ARG_URL_ENUM) as FbItem }
val position: Int by lazy { arguments.getInt(ARG_POSITION) }
val url: String by lazy { arguments!!.getString(ARG_URL) }
val urlEnum: FbItem by lazy { arguments!!.getSerializable(ARG_URL_ENUM) as FbItem }
val position: Int by lazy { arguments!!.getInt(ARG_POSITION) }
lateinit var frostWebView: FrostWebView
private var firstLoad = true
private var activityDisposable: Disposable? = null
@ -60,12 +60,12 @@ class WebFragment : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
super.onCreateView(inflater, container, savedInstanceState)
frostWebView = FrostWebView(context)
frostWebView = FrostWebView(context!!)
frostWebView.setupWebview(url, urlEnum)
return frostWebView
}
override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
onCreateRunnable?.invoke(this)
onCreateRunnable = null

View File

@ -25,7 +25,7 @@ class IntroFragmentTheme : BaseIntroFragment(R.layout.intro_theme) {
override fun viewArray(): Array<Array<out View>>
= arrayOf(arrayOf(title), arrayOf(light, dark), arrayOf(amoled, glass))
override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
light.setThemeClick(Theme.LIGHT)
dark.setThemeClick(Theme.DARK)

View File

@ -22,7 +22,7 @@ abstract class BaseImageIntroFragment(val titleRes: Int, val imageRes: Int, val
override fun viewArray(): Array<Array<out View>>
= arrayOf(arrayOf(title), arrayOf(desc))
override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
title.setText(titleRes)
image.setImageResource(imageRes)
desc.setText(descRes)

View File

@ -64,7 +64,7 @@ abstract class BaseIntroFragment(val layoutRes: Int) : Fragment() {
return view
}
override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
themeFragment()
}
@ -126,7 +126,7 @@ class IntroFragmentEnd : BaseIntroFragment(R.layout.intro_end) {
}
@SuppressLint("ClickableViewAccessibility")
override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
container.setOnSingleTapListener { _, event ->
(activity as IntroActivity).finish(event.x, event.y)

View File

@ -45,7 +45,7 @@ fun setupNotificationChannels(c: Context) {
manager.createNotificationChannel(mainChannel)
}
val Context.frostNotification: NotificationCompat.Builder
inline val Context.frostNotification: NotificationCompat.Builder
get() = NotificationCompat.Builder(this, BuildConfig.APPLICATION_ID).apply {
setSmallIcon(R.drawable.frost_f_24)
setAutoCancel(true)
@ -63,7 +63,7 @@ fun NotificationCompat.Builder.withDefaults(ringtone: String = Prefs.notificatio
setDefaults(defaults)
}
val NotificationCompat.Builder.withBigText: NotificationCompat.BigTextStyle
inline val NotificationCompat.Builder.withBigText: NotificationCompat.BigTextStyle
get() = NotificationCompat.BigTextStyle(this)
/**

View File

@ -26,8 +26,8 @@ private const val FROST_PRO = "frost_pro"
* Implemented pro checker with a hook for debug builds
* Use this when checking if the pro feature is enabled
*/
val IS_FROST_PRO: Boolean
get() = (BuildConfig.DEBUG && Prefs.debugPro) || Prefs.pro
inline val IS_FROST_PRO: Boolean
get() = Prefs.pro || (BuildConfig.DEBUG && Prefs.debugPro)
interface FrostBilling : BillingProcessor.IBillingHandler {
fun Activity.onCreateBilling()

View File

@ -1,4 +1,5 @@
<resources>
<string name="dev_name" translatable="false">Pitched Apps</string>
<string name="dev_email" translatable="false">pitchedapps@gmail.com</string>
<string name="dev_paypal" translatable="false">https://www.paypal.me/Allanw9</string>
<string name="paypal" translatable="false">PayPal</string>

View File

@ -17,7 +17,7 @@ MIN_SDK=21
TARGET_SDK=26
BUILD_TOOLS=26.0.2
KAU=a0587e8
KAU=4e52d2d
KOTLIN=1.1.51
COMMONS_TEXT=1.1
@ -27,10 +27,10 @@ EXOMEDIA=4.0.3
IAB=1.0.44
IICON_COMMUNITY=1.9.32.2
IICON_MATERIAL=2.2.0.3
JSOUP=1.10.3
LEAK_CANARY=1.5.1
MATERIAL_DRAWER_KT=1.0.6
OKHTTP=3.8.1
JSOUP=1.11.1
LEAK_CANARY=1.5.4
MATERIAL_DRAWER_KT=1.2.1
OKHTTP=3.9.0
PAPER_PARCEL=2.0.4
ROBOELECTRIC=3.4
RX_ANDROID=2.0.1