Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
Message
Commits
c069148f
Commit
c069148f
authored
Mar 31, 2022
by
narinder Rana
Browse files
Merge branch '108-about-page' into 'main'
108 about page See merge request
!53
parents
22f40cd1
9d1b9872
Pipeline
#174697
passed with stage
in 3 minutes and 19 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
presentation/src/main/java/com/moez/QKSMS/common/Navigator.kt
View file @
c069148f
...
...
@@ -141,25 +141,17 @@ class Navigator @Inject constructor(
startActivity
(
intent
)
}
fun
showDeveloper
(
)
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
U
ri
.
parse
(
"https://github.com/moezbhatti"
)
)
startActivity
External
(
intent
)
fun
openUri
(
uri
:
Uri
)
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
u
ri
)
startActivity
(
intent
)
}
fun
showSourceCode
()
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
"https://github.com/moezbhatti/qksms"
))
startActivityExternal
(
intent
)
}
fun
showChangelog
()
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
"https://github.com/moezbhatti/qksms/releases"
))
startActivityExternal
(
intent
)
}
fun
showLicense
()
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
"https://github.com/moezbhatti/qksms/blob/master/LICENSE"
))
startActivityExternal
(
intent
)
}
fun
showBlockedConversations
()
{
val
intent
=
Intent
(
context
,
BlockingActivity
::
class
.
java
)
...
...
@@ -177,19 +169,7 @@ class Navigator @Inject constructor(
startActivityExternal
(
intent
)
}
fun
showRating
()
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
"market://details?id=com.moez.QKSMS"
))
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NO_HISTORY
or
Intent
.
FLAG_ACTIVITY_NEW_DOCUMENT
or
Intent
.
FLAG_ACTIVITY_MULTIPLE_TASK
)
try
{
startActivityExternal
(
intent
)
}
catch
(
e
:
ActivityNotFoundException
)
{
val
url
=
"http://play.google.com/store/apps/details?id=com.moez.QKSMS"
startActivityExternal
(
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
url
)))
}
}
/**
* Launch the Play Store and display the Call Blocker listing
...
...
presentation/src/main/java/com/moez/QKSMS/feature/settings/about/AboutController.kt
View file @
c069148f
...
...
@@ -31,7 +31,8 @@ import javax.inject.Inject
class
AboutController
:
QkController
<
AboutView
,
Unit
,
AboutPresenter
>(),
AboutView
{
@Inject
override
lateinit
var
presenter
:
AboutPresenter
@Inject
override
lateinit
var
presenter
:
AboutPresenter
init
{
appComponent
.
inject
(
this
)
...
...
@@ -39,7 +40,7 @@ class AboutController : QkController<AboutView, Unit, AboutPresenter>(), AboutVi
}
override
fun
onViewCreated
()
{
version
.
summary
=
BuildConfig
.
VERSION_NAME
app_
version
.
summary
=
BuildConfig
.
VERSION_NAME
}
override
fun
onAttach
(
view
:
View
)
{
...
...
@@ -59,4 +60,4 @@ class AboutController : QkController<AboutView, Unit, AboutPresenter>(), AboutVi
// No special rendering required
}
}
\ No newline at end of file
}
presentation/src/main/java/com/moez/QKSMS/feature/settings/about/AboutPresenter.kt
View file @
c069148f
...
...
@@ -18,6 +18,7 @@
*/
package
com.moez.QKSMS.feature.settings.about
import
android.net.Uri
import
com.moez.QKSMS.R
import
com.moez.QKSMS.common.Navigator
import
com.moez.QKSMS.common.base.QkPresenter
...
...
@@ -32,21 +33,21 @@ class AboutPresenter @Inject constructor(
override
fun
bindIntents
(
view
:
AboutView
)
{
super
.
bindIntents
(
view
)
view
.
preferenceClicks
()
.
autoDisposable
(
view
.
scope
())
.
subscribe
{
preference
->
when
(
preference
.
id
)
{
R
.
id
.
developer
->
navigator
.
showDeveloper
()
R
.
id
.
source
->
navigator
.
showSourceCode
()
R
.
id
.
changelog
->
navigator
.
showChangelog
()
R
.
id
.
contact
->
navigator
.
showSupport
()
R
.
id
.
license
->
navigator
.
showLicense
()
R
.
id
.
fork
->
navigator
.
openUri
(
Uri
.
parse
(
"https://github.com/moezbhatti/qksms"
))
R
.
id
.
source
->
navigator
.
openUri
(
Uri
.
parse
(
"https://gitlab.e.foundation/e/apps/message"
))
R
.
id
.
copyright
->
navigator
.
openUri
(
Uri
.
parse
(
"https://gitlab.e.foundation/e/apps/Message/-/blob/master/AUTHORS"
))
R
.
id
.
license
->
navigator
.
openUri
(
Uri
.
parse
(
"https://gitlab.e.foundation/e/apps/Message/-/blob/master/LICENSE"
))
R
.
id
.
author
->
navigator
.
openUri
(
Uri
.
parse
(
"https://gitlab.e.foundation/e/apps/Message/-/blob/master/AUTHORS"
))
R
.
id
.
privacy
->
navigator
.
openUri
(
Uri
.
parse
(
"https://e.foundation/legal-notice-privacy/"
))
R
.
id
.
service_terms
->
navigator
.
openUri
(
Uri
.
parse
(
"https://e.foundation/legal-notice-privacy/"
))
R
.
id
.
app_version
->
navigator
.
openUri
(
Uri
.
parse
(
"https://gitlab.e.foundation/e/apps/Message/-/releases"
))
}
}
}
}
\ No newline at end of file
}
presentation/src/main/res/layout/about_controller.xml
View file @
c069148f
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2019 Moez Bhatti <moez.bhatti@gmail.com>
~
~ This file is part of QKSMS.
...
...
@@ -19,7 +18,6 @@
-->
<ScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"?android:attr/windowBackground"
>
...
...
@@ -34,46 +32,58 @@
android:paddingBottom=
"8dp"
>
<com.moez.QKSMS.common.widget.PreferenceView
android:id=
"@+id/
version
"
android:id=
"@+id/
app_info
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:
title
=
"@string/a
bout_version_title
"
tools:summary=
"3.0.8
"
/>
app:
summary
=
"@string/a
pp_info
"
app:title=
"@string/app_info_title
"
/>
<com.moez.QKSMS.common.widget.PreferenceView
android:id=
"@+id/
developer
"
android:id=
"@+id/
app_version
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:
summary
=
"@string/a
bout_developer"
app:title=
"@string/about_developer_title"
/>
app:
title
=
"@string/a
pp_version_title"
/>
<com.moez.QKSMS.common.widget.PreferenceView
android:id=
"@+id/
source
"
android:id=
"@+id/
fork
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:summary=
"@string/about_source"
app:title=
"@string/about_source_title"
/>
app:title=
"@string/about_fork_title"
/>
<com.moez.QKSMS.common.widget.PreferenceView
android:id=
"@+id/
changelog
"
android:id=
"@+id/
license
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:summary=
"@string/about_
changelog
"
app:title=
"@string/about_
changelog
_title"
/>
app:summary=
"@string/about_
license
"
app:title=
"@string/about_
license
_title"
/>
<com.moez.QKSMS.common.widget.PreferenceView
android:id=
"@+id/
contact
"
android:id=
"@+id/
author
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:summary=
"@string/about_
contact
"
app:title=
"@string/about_
contact
_title"
/>
app:summary=
"@string/about_
author
"
app:title=
"@string/about_
author
_title"
/>
<com.moez.QKSMS.common.widget.PreferenceView
android:id=
"@+id/
licens
e"
android:id=
"@+id/
sourc
e"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:summary=
"@string/about_license"
app:title=
"@string/about_license_title"
/>
app:summary=
"@string/about_source"
app:title=
"@string/about_source_title"
/>
<com.moez.QKSMS.common.widget.PreferenceView
android:id=
"@+id/privacy"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:title=
"@string/about_privacy_title"
/>
<com.moez.QKSMS.common.widget.PreferenceView
android:id=
"@+id/service_terms"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:title=
"@string/about_terms_title"
/>
<com.moez.QKSMS.common.widget.PreferenceView
android:id=
"@+id/copyright"
...
...
@@ -84,4 +94,4 @@
</LinearLayout>
</ScrollView>
\ No newline at end of file
</ScrollView>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment