Notification bell (#2012)

* Add notification bell button, API endpoints and new relationship field

* Add notification type for subscriptions

* Add subscriptions to legacy notification filtering

* Update schemas

* Fix build

* Make rewrite static method into method of Notification class, fix getNotificationText

* Mastodon wording for subscriptions
This commit is contained in:
Alibek Omarov 2020-12-23 14:52:39 +03:00 committed by GitHub
commit b91a0aceeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 970 additions and 33 deletions

View file

@ -71,6 +71,26 @@
app:layout_constraintStart_toEndOf="@id/accountMuteButton"
app:layout_constraintTop_toTopOf="parent"
tools:text="Follow Requested" />
<com.google.android.material.button.MaterialButton
android:id="@+id/accountSubscribeButton"
style="@style/TuskyButton.Outlined"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="6dp"
android:minWidth="0dp"
android:paddingStart="8dp"
android:paddingEnd="4dp"
android:scaleType="centerInside"
app:icon="@drawable/ic_notifications_24dp"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toBottomOf="@+id/accountFollowButton"
app:layout_constraintEnd_toStartOf="@id/accountFollowButton"
app:layout_constraintHorizontal_bias="1"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="@id/accountMuteButton"
app:layout_constraintTop_toTopOf="@+id/accountFollowButton" />
<com.google.android.material.button.MaterialButton
android:id="@+id/accountMuteButton"
@ -86,7 +106,7 @@
app:icon="@drawable/ic_unmute_24dp"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toBottomOf="@+id/accountFollowButton"
app:layout_constraintEnd_toStartOf="@id/accountFollowButton"
app:layout_constraintEnd_toStartOf="@id/accountSubscribeButton"
app:layout_constraintHorizontal_bias="1"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="@id/guideAvatar"

View file

@ -145,8 +145,6 @@
android:layout_marginRight="14dp"
android:layout_marginBottom="14dp"
android:contentDescription="@string/action_view_profile"
android:paddingRight="12dp"
android:paddingBottom="12dp"
android:scaleType="centerCrop"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:src="@drawable/avatar_default" />