2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 18:07:55 +00:00

Remove copyright and app description from About

This commit is contained in:
Albert Vaca Cintora 2023-04-05 00:39:28 +02:00
parent f9ea5f0e77
commit 5250fde0b1
5 changed files with 4 additions and 20 deletions

View File

@ -63,13 +63,6 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/app_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textIsSelectable="true"
android:layout_margin="12dp"
tools:text="Application Description" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>

View File

@ -466,8 +466,6 @@
<string name="website">Website</string> <string name="website">Website</string>
<string name="website_url" translatable="false">https://kdeconnect.kde.org/</string> <string name="website_url" translatable="false">https://kdeconnect.kde.org/</string>
<string name="copyright_statement" translatable="false">(С) 2013-2021 The KDE Connect Developers</string>
<string name="about">About</string> <string name="about">About</string>
<string name="authors">Authors</string> <string name="authors">Authors</string>
<string name="thanks_to">Thanks To</string> <string name="thanks_to">Thanks To</string>
@ -487,8 +485,6 @@
<string name="send_compose">Send</string> <string name="send_compose">Send</string>
<string name="open_compose_send">Compose text</string> <string name="open_compose_send">Compose text</string>
<string name="app_description">Multi-platform app that allows your devices to communicate (e.g., your phone and your computer)</string>
<string name="about_kde_about"><![CDATA[ <string name="about_kde_about"><![CDATA[
<h1>About</h1> <h1>About</h1>
<p>KDE is a world-wide community of software engineers, artists, writers, translators and creators who are committed to <a href="https://www.gnu.org/philosophy/free-sw.html">Free Software</a> development. KDE produces the Plasma desktop environment, hundreds of applications, and the many software libraries that support them.</p> <p>KDE is a world-wide community of software engineers, artists, writers, translators and creators who are committed to <a href="https://www.gnu.org/philosophy/free-sw.html">Free Software</a> development. KDE produces the Plasma desktop environment, hundreds of applications, and the many software libraries that support them.</p>

View File

@ -10,19 +10,17 @@ import android.content.Context
import android.os.Parcel import android.os.Parcel
import android.os.Parcelable import android.os.Parcelable
class AboutData(var name: String, var description: Int, var icon: Int, var versionName: String, var copyrightStatement: String? = null, class AboutData(var name: String, var icon: Int, var versionName: String, var bugURL: String? = null,
var bugURL: String? = null, var websiteURL: String? = null, var sourceCodeURL: String? = null, var donateURL: String? = null, var websiteURL: String? = null, var sourceCodeURL: String? = null, var donateURL: String? = null,
var authorsFooterText: Int? = null) : Parcelable { var authorsFooterText: Int? = null) : Parcelable {
val authors: MutableList<AboutPerson> = mutableListOf() val authors: MutableList<AboutPerson> = mutableListOf()
constructor(parcel: Parcel) : this(parcel.readString()!!, parcel.readInt(), parcel.readInt(), parcel.readString()!!, parcel.readString(), constructor(parcel: Parcel) : this(parcel.readString()!!, parcel.readInt(), parcel.readString()!!,
parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(),
if (parcel.readByte() == 0x01.toByte()) parcel.readInt() else null) { if (parcel.readByte() == 0x01.toByte()) parcel.readInt() else null) {
parcel.readList(authors as List<*>, AboutPerson::class.java.classLoader) parcel.readList(authors as List<*>, AboutPerson::class.java.classLoader)
} }
fun getDescriptionString(context: Context): String = context.resources.getString(description)
companion object CREATOR : Parcelable.Creator<AboutData> { companion object CREATOR : Parcelable.Creator<AboutData> {
override fun createFromParcel(parcel: Parcel): AboutData = AboutData(parcel) override fun createFromParcel(parcel: Parcel): AboutData = AboutData(parcel)
override fun newArray(size: Int): Array<AboutData?> = arrayOfNulls(size) override fun newArray(size: Int): Array<AboutData?> = arrayOfNulls(size)
@ -30,10 +28,8 @@ class AboutData(var name: String, var description: Int, var icon: Int, var versi
override fun writeToParcel(parcel: Parcel, flags: Int) { override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeString(name) parcel.writeString(name)
parcel.writeInt(description)
parcel.writeInt(icon) parcel.writeInt(icon)
parcel.writeString(versionName) parcel.writeString(versionName)
parcel.writeString(copyrightStatement)
parcel.writeList(authors.toList()) parcel.writeList(authors.toList())
parcel.writeString(bugURL) parcel.writeString(bugURL)

View File

@ -57,7 +57,6 @@ class AboutFragment : Fragment() {
// Update general info // Update general info
binding!!.appName.text = aboutData.name binding!!.appName.text = aboutData.name
binding!!.appDescription.text = this.context?.let { aboutData.getDescriptionString(it) } + if (aboutData.copyrightStatement == null) "" else "\n\n" + aboutData.copyrightStatement
binding!!.appIcon.setImageDrawable(this.context?.let { ContextCompat.getDrawable(it, aboutData.icon) }) binding!!.appIcon.setImageDrawable(this.context?.let { ContextCompat.getDrawable(it, aboutData.icon) })
binding!!.appVersion.text = this.context?.getString(R.string.version, aboutData.versionName) binding!!.appVersion.text = this.context?.getString(R.string.version, aboutData.versionName)

View File

@ -14,7 +14,7 @@ import org.kde.kdeconnect_tp.R
* Add authors and credits here * Add authors and credits here
*/ */
fun getApplicationAboutData(context: Context): AboutData { fun getApplicationAboutData(context: Context): AboutData {
val aboutData = AboutData(context.getString(R.string.kde_connect), R.string.app_description, R.drawable.icon, BuildConfig.VERSION_NAME, context.getString(R.string.copyright_statement), val aboutData = AboutData(context.getString(R.string.kde_connect), R.drawable.icon, BuildConfig.VERSION_NAME,
context.getString(R.string.report_bug_url), context.getString(R.string.website_url), context.getString(R.string.source_code_url), context.getString(R.string.donate_url), context.getString(R.string.report_bug_url), context.getString(R.string.website_url), context.getString(R.string.source_code_url), context.getString(R.string.donate_url),
R.string.everyone_else) R.string.everyone_else)