Skip to content

Commit

Permalink
Removed censorship. Added a Gab branding. Split output into abi speci…
Browse files Browse the repository at this point in the history
…fic apk's.
  • Loading branch information
johanw666 committed Dec 5, 2023
1 parent a7e0fa2 commit 960cefa
Show file tree
Hide file tree
Showing 92 changed files with 522 additions and 516 deletions.
28 changes: 11 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
[![Translate - with Weblate](https://img.shields.io/badge/translate%20with-Weblate-green.svg?style=flat)](https://weblate.tusky.app/) [![OpenCollective](https://opencollective.com/tusky/backers/badge.svg)](https://opencollective.com/tusky/) [![Build Status](https://app.bitrise.io/app/a3e773c3c57a894c/status.svg?token=qLu_Ti4Gp2LWcYT4eo2INQ&branch=develop)](https://app.bitrise.io/app/a3e773c3c57a894c)
# Tusky
# Gab

<img src="/fastlane/metadata/android/en-US/images/icon.png" width="120" height="120"/>
Gab is a beautiful Android client for [Mastodon](https://github.com/tootsuite/mastodon). Mastodon is an ActivityPub federated social network. That means no single entity controls the whole network, rather, like e-mail, volunteers and organisations operate their own independent servers, users from which can all interact with each other seamlessly.

Tusky is a beautiful Android client for [Mastodon](https://github.com/mastodon/mastodon). Mastodon is an ActivityPub federated social network. That means no single entity controls the whole network, rather, like e-mail, volunteers and organisations operate their own independent servers, users from which can all interact with each other seamlessly.

[<img src="/assets/fdroid_badge.png" alt="Get it on F-Droid" height="80" />](https://f-droid.org/repository/browse/?fdid=com.keylesspalace.tusky)
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" alt="Get it on Google Play" height="80" />](https://play.google.com/store/apps/details?id=com.keylesspalace.tusky&utm_source=github&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1)
Gab is a fork of Tusky (https://github.com/tuskyapp/Tusky) that does not censor free-speech nodes.

## Features

- Material Design
- Most Mastodon APIs implemented
- Multi-Account support
- Dark, light and black themes with the possibility to auto-switch based on the time of day
- Drafts - compose posts and save them for later
- Drafts - compose toots and save them for later
- Choose between different emoji styles
- Optimized for all screen sizes
- Completely open-source - no non-free dependencies like Google services

### Testing

The nightly build containing the newest development code is [available on Google Play](https://play.google.com/store/apps/details?id=com.keylesspalace.tusky.test).

### Support

Check out our [FAQs](https://github.com/tuskyapp/faq/blob/main/README.md), your question may already be answered.
If you have any bug reports, feature requests or questions please open an issue or send us a message at [[email protected]](https://mastodon.social/@Tusky)!
If you have any bug reports, feature requests or questions please open an issue.

For translating Gab-changed strings into your language, please open an issue.

### Head of development

### Contributing
We always welcome new contributors! Please read our [contribution guide](https://github.com/tuskyapp/Tusky/blob/develop/CONTRIBUTING.md) to get started.
This port was done by johanw666.

### Development chatroom
https://matrix.to/#/#Tusky:matrix.org
###
36 changes: 26 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ apply from: 'getGitSha.gradle'
final def gitSha = ext.getGitSha()

// The app name
final def APP_NAME = "Tusky"
final def APP_NAME = "Gab" // JW
// The application id. Must be unique, e.g. based on your domain
final def APP_ID = "com.keylesspalace.tusky"
final def APP_ID = "com.gabai.gabby" // JW
// url of a custom app logo. Recommended size at least 600x600. Keep empty to use the Tusky elephant friend.
final def CUSTOM_LOGO_URL = ""
// e.g. mastodon.social. Keep empty to not suggest any instance on the signup screen
final def CUSTOM_INSTANCE = ""
final def CUSTOM_INSTANCE = "gab.com" // JW
// link to your support account. Will be linked on the about page when not empty.
final def SUPPORT_ACCOUNT_URL = "https://mastodon.social/@Tusky"
final def SUPPORT_ACCOUNT_URL = "" // JW

android {
compileSdk 33
Expand All @@ -30,7 +30,7 @@ android {
minSdk 24
targetSdk 33
versionCode 115
versionName "24.0"
versionName "24.0.0-JW"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

Expand All @@ -39,6 +39,20 @@ android {
buildConfigField("String", "CUSTOM_LOGO_URL", "\"$CUSTOM_LOGO_URL\"")
buildConfigField("String", "CUSTOM_INSTANCE", "\"$CUSTOM_INSTANCE\"")
buildConfigField("String", "SUPPORT_ACCOUNT_URL", "\"$SUPPORT_ACCOUNT_URL\"")

// JW: add abifilters
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}

splits {
abi {
enable true
reset()
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
universalApk true
}
}
}
buildTypes {
release {
Expand All @@ -54,7 +68,7 @@ android {
green {
resValue "string", "app_name", APP_NAME + " Test"
applicationIdSuffix ".test"
versionNameSuffix "-" + gitSha
versionNameSuffix// "-" + gitSha // JW
}
}

Expand Down Expand Up @@ -99,10 +113,12 @@ android {
includeInApk false
includeInBundle false
}
applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "Tusky_${variant.versionName}_${variant.versionCode}_${gitSha}_" +
"${variant.flavorName}_${buildType.name}.apk"

// JW: completely rewrote output naming
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def abiName = output.getFilter("ABI") ?: 'universal'
outputFileName = outputFileName = "Gab-${variant.versionName}-" + "${variant.flavorName}-${buildType.name}-${abiName}.apk"
}
}
}
Expand Down
Binary file modified app/src/blue/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/blue/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/blue/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/blue/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/blue/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/green/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/green/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/green/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/green/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/green/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/src/main/java/com/keylesspalace/tusky/AboutActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ class AboutActivity : BottomSheetActivity(), Injectable {
viewUrl(BuildConfig.SUPPORT_ACCOUNT_URL)
}

// JW: added
if (BuildConfig.SUPPORT_ACCOUNT_URL.isBlank()) {
binding.tuskyProfileButton.hide()
}

binding.aboutLicensesButton.setOnClickListener {
startActivityWithSlideInAnimation(Intent(this, LicenseActivity::class.java))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class NetworkModule {
val requestWithUserAgent = chain.request().newBuilder()
.header(
"User-Agent",
"Tusky/${BuildConfig.VERSION_NAME} Android/${Build.VERSION.RELEASE} OkHttp/${OkHttp.VERSION}"
"Gab/${BuildConfig.VERSION_NAME} Android/${Build.VERSION.RELEASE} OkHttp/${OkHttp.VERSION}" // JW: change user agent name
)
.build()
chain.proceed(requestWithUserAgent)
Expand Down
Binary file added app/src/main/res/drawable-hdpi/ic_notify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-hdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/ic_notify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/ic_notify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/ic_notify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions app/src/main/res/drawable/ic_splash.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="240dp"
android:layout_width="240dp">

<item android:drawable="@color/icon_background" />

<item
android:drawable="@drawable/ic_launcher_foreground" />

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="@color/tusky_grey_20"/>
</item>
<item>
<bitmap
android:src="@drawable/splash"
android:gravity="center" />
</item>
</layer-list>
6 changes: 0 additions & 6 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

This file was deleted.

Binary file added app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file added app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
12 changes: 6 additions & 6 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<string name="action_unfavourite">إزالة المفضلة</string>
<string name="action_more">المزيد</string>
<string name="action_compose">حرر</string>
<string name="action_login">الولوج باستخدام Tusky</string>
<string name="action_login">الولوج باستخدام Gab</string>
<string name="action_logout">خروج</string>
<string name="action_logout_confirm">متأكد مِن أنك تود الخروج من الحساب %1$s؟</string>
<string name="action_follow">إتبع</string>
Expand Down Expand Up @@ -230,9 +230,9 @@
to show we do not mean the software is gratis. Source: https://www.gnu.org/philosophy/free-sw.html
* the url can be changed to link to the localized version of the license.
-->
<string name="about_project_site">موقع ويب المشروع: https://tusky.app</string>
<string name="about_project_site">موقع ويب المشروع: https://gab.com</string>
<string name="about_bug_feature_request_site">تقارير الأخطاء وطلبات التحسينات:
\nhttps://github.com/tuskyapp/Tusky/issues</string>
\nhttps://github.com/johanw666/Gab/issues</string>
<string name="about_tusky_account">الملف الشخصي لتوسكي</string>
<string name="post_share_content">شارك محتوى التبويق</string>
<string name="post_share_link">شارك الرابط إلى التبويق</string>
Expand Down Expand Up @@ -473,7 +473,7 @@
<string name="title_bookmarks">الفواصل المرجعية</string>
<string name="action_bookmark">أضفه إلى الفواصل المرجعية</string>
<string name="action_view_bookmarks">الفواصل المرجعية</string>
<string name="about_powered_by_tusky">مدعوم بِـ Tusky</string>
<string name="about_powered_by_tusky">مدعوم بِـ Gab</string>
<string name="description_post_bookmarked">أضيف إلى الفواصل المرجعية</string>
<string name="select_list_title">اختر قائمة</string>
<string name="list">القائمة</string>
Expand Down Expand Up @@ -592,7 +592,7 @@
<item quantity="other">لا يمكنك رفع أكثر من %1$d مرفقات.</item>
</plurals>
<string name="saving_draft">جار حفظ المسودة …</string>
<string name="dialog_push_notification_migration_other_accounts">لقد قمت بإعادة تسجيل الدخول إلى حسابك الجاري لمنح إذن الاشعارات لـ Tusky. ومع ذلك، لا يزال لديك حسابات أخرى لم يتم ترحيلها بهذه الطريقة. قم بالتبديل إليهم وإعادة تسجيل الدخول واحدًا تلو الآخر لتمكين دعم إشعارات UnifiedPush.</string>
<string name="dialog_push_notification_migration_other_accounts">لقد قمت بإعادة تسجيل الدخول إلى حسابك الجاري لمنح إذن الاشعارات لـ Gab. ومع ذلك، لا يزال لديك حسابات أخرى لم يتم ترحيلها بهذه الطريقة. قم بالتبديل إليهم وإعادة تسجيل الدخول واحدًا تلو الآخر لتمكين دعم إشعارات UnifiedPush.</string>
<string name="instance_rule_title">%s شروط</string>
<string name="language_display_name_format">%s (%s)</string>
<string name="pref_default_post_language">لغة النشر الافتراضية</string>
Expand Down Expand Up @@ -634,7 +634,7 @@
<string name="title_followed_hashtags">الوسوم المتابَعة</string>
<string name="error_status_source_load">فشل تحميل مصدر المنشور من الخادم.</string>
<string name="report_category_violation">انتهاك الشروط</string>
<string name="dialog_push_notification_migration">من أجل استخدام الإشعارات عبر UnifiedPush ، يحتاج Tusky إلى إذن للإشتراك في الإشعارات على خادم Mastodon الخاص بك. يتطلب هذا إعادة تسجيل الدخول لتغيير نطاقات OAuth الممنوحة لـ Tusky. سيؤدي استخدام خيار إعادة تسجيل الدخول هنا أو في اعدادات الحساب إلى الاحتفاظ بجميع المسودات المحلية وذاكرة التخزين المؤقت.</string>
<string name="dialog_push_notification_migration">من أجل استخدام الإشعارات عبر UnifiedPush ، يحتاج Gab إلى إذن للإشتراك في الإشعارات على خادم Mastodon الخاص بك. يتطلب هذا إعادة تسجيل الدخول لتغيير نطاقات OAuth الممنوحة لـ Gab. سيؤدي استخدام خيار إعادة تسجيل الدخول هنا أو في اعدادات الحساب إلى الاحتفاظ بجميع المسودات المحلية وذاكرة التخزين المؤقت.</string>
<string name="pref_title_wellbeing_mode">الرفاهية</string>
<string name="account_date_joined">انضم في %1$s</string>
<string name="title_migration_relogin">أعد تسجيل الدخول لاستلام الاشعارات</string>
Expand Down
Loading

0 comments on commit 960cefa

Please sign in to comment.