Remove default instructions to use ntfy cli
This commit is contained in:
parent
0571096d44
commit
aea2d6b289
2 changed files with 0 additions and 61 deletions
|
@ -167,24 +167,12 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra
|
|||
val topicUrl = topicShortUrl(subscriptionBaseUrl, subscriptionTopic)
|
||||
title = subscriptionDisplayName
|
||||
|
||||
// Set "how to instructions"
|
||||
val howToExample: TextView = findViewById(R.id.detail_how_to_example)
|
||||
howToExample.linksClickable = true
|
||||
|
||||
val howToText = getString(R.string.detail_how_to_example, topicUrl)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
howToExample.text = Html.fromHtml(howToText, Html.FROM_HTML_MODE_LEGACY)
|
||||
} else {
|
||||
howToExample.text = Html.fromHtml(howToText)
|
||||
}
|
||||
|
||||
// Swipe to refresh
|
||||
mainListContainer = findViewById(R.id.detail_notification_list_container)
|
||||
mainListContainer.setOnRefreshListener { refresh() }
|
||||
mainListContainer.setColorSchemeResources(Colors.refreshProgressIndicator)
|
||||
|
||||
// Update main list based on viewModel (& its datasource/livedata)
|
||||
val noEntriesText: View = findViewById(R.id.detail_no_notifications)
|
||||
val onNotificationClick = { n: Notification -> onNotificationClick(n) }
|
||||
val onNotificationLongClick = { n: Notification -> onNotificationLongClick(n) }
|
||||
|
||||
|
@ -198,10 +186,8 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra
|
|||
adapter.submitList(it as MutableList<Notification>)
|
||||
if (it.isEmpty()) {
|
||||
mainListContainer.visibility = View.GONE
|
||||
noEntriesText.visibility = View.VISIBLE
|
||||
} else {
|
||||
mainListContainer.visibility = View.VISIBLE
|
||||
noEntriesText.visibility = View.GONE
|
||||
}
|
||||
|
||||
// Cancel notifications that still have popups
|
||||
|
|
|
@ -26,51 +26,4 @@
|
|||
app:layoutManager="LinearLayoutManager"/>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/detail_no_notifications" app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" app:srcCompat="@drawable/ic_sms_gray_48dp"
|
||||
android:id="@+id/detail_no_notifications_image"/>
|
||||
<TextView
|
||||
android:id="@+id/detail_no_notifications_text"
|
||||
android:text="@string/detail_no_notifications_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:padding="10dp" android:gravity="center_horizontal"
|
||||
android:paddingStart="50dp" android:paddingEnd="50dp"/>
|
||||
<TextView
|
||||
android:text="@string/detail_how_to_intro"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/detail_how_to_intro"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginEnd="50dp"/>
|
||||
<TextView
|
||||
android:text="@string/detail_how_to_example"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/detail_how_to_example"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginEnd="50dp"/>
|
||||
<TextView
|
||||
android:text="@string/detail_how_to_link"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/detail_how_to_link"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:linksClickable="true"
|
||||
android:autoLink="web"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
Loading…
Reference in a new issue