diff --git a/app/src/main/java/org/futo/circles/feature/home/HomeFragment.kt b/app/src/main/java/org/futo/circles/feature/home/HomeFragment.kt index 0fcd4bd2b6f4e61a8ae734084fadde7b5a3c61b3..66f853d2c27a720611e53b3ed36408876e21c867 100644 --- a/app/src/main/java/org/futo/circles/feature/home/HomeFragment.kt +++ b/app/src/main/java/org/futo/circles/feature/home/HomeFragment.kt @@ -29,7 +29,6 @@ import org.futo.circles.core.model.CircleRoomTypeArg import org.futo.circles.core.model.GROUP_TYPE import org.futo.circles.core.model.LoadingData import org.futo.circles.core.model.TIMELINE_TYPE -import org.futo.circles.core.notices.SystemNoticesCountSharedViewModel import org.futo.circles.core.picker.helper.RuntimePermissionHelper import org.futo.circles.core.provider.MatrixSessionProvider import org.futo.circles.core.view.LoadingDialog @@ -52,7 +51,6 @@ class HomeFragment : Fragment(R.layout.fragment_bottom_navigation), DeepLinkInte RuntimePermissionHelper(this, Manifest.permission.POST_NOTIFICATIONS) private val viewModel by viewModels<HomeViewModel>() - private val systemNoticesCountViewModel by activityViewModels<SystemNoticesCountSharedViewModel>() private val loadingDialog by lazy { LoadingDialog(requireContext()) } @Inject @@ -118,13 +116,6 @@ class HomeFragment : Fragment(R.layout.fragment_bottom_navigation), DeepLinkInte } private fun setupObservers() { - systemNoticesCountViewModel.systemNoticesCountLiveData?.observeData(this) { - val count = it ?: 0 - binding.bottomNavigationView.getOrCreateBadge(R.id.settings_nav_graph).apply { - isVisible = count > 0 - number = count - } - } viewModel.inviteIntoSharedSpaceLiveData?.observeData(this) { viewModel.autoAcceptInviteOnKnock(it) } diff --git a/app/src/main/java/org/futo/circles/feature/settings/SettingsFragment.kt b/app/src/main/java/org/futo/circles/feature/settings/SettingsFragment.kt index 4fa99c223c6e8efbe898457e31e96e8272cb84c3..e8a3f3d145de0f1bd25965c8df153d710e9875ae 100644 --- a/app/src/main/java/org/futo/circles/feature/settings/SettingsFragment.kt +++ b/app/src/main/java/org/futo/circles/feature/settings/SettingsFragment.kt @@ -22,7 +22,6 @@ import org.futo.circles.core.extensions.showSuccess import org.futo.circles.core.extensions.withConfirmation import org.futo.circles.core.model.DeactivateAccount import org.futo.circles.core.model.LoadingData -import org.futo.circles.core.notices.SystemNoticesCountSharedViewModel import org.futo.circles.core.provider.PreferencesProvider import org.futo.circles.core.view.LoadingDialog import org.futo.circles.databinding.FragmentSettingsBinding @@ -33,7 +32,6 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) { private val binding by viewBinding(FragmentSettingsBinding::bind) private val viewModel by viewModels<SettingsViewModel>() - private val systemNoticesCountViewModel by activityViewModels<SystemNoticesCountSharedViewModel>() private val loadingDialog by lazy { LoadingDialog(requireContext()) } private val preferencesProvider by lazy { PreferencesProvider(requireContext()) } private val navigator by lazy { SettingsNavigator(this) } @@ -62,7 +60,6 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) { } } tvLoginSessions.setOnClickListener { navigator.navigateToActiveSessions() } - lSystemNotices.setOnClickListener { navigator.navigateToSystemNotices() } tvClearCache.setOnClickListener { viewModel.clearCash(requireContext()) } tvVersion.setOnLongClickListener { toggleDeveloperMode(); true } tvPushNotifications.setOnClickListener { navigator.navigateToPushSettings() } @@ -84,9 +81,6 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) { error = { showError(getString(org.futo.circles.auth.R.string.invalid_auth)) }, onRequestInvoked = { loadingDialog.dismiss() } ) - systemNoticesCountViewModel.systemNoticesCountLiveData?.observeData(this) { - binding.ivNoticesCount.setCount(it ?: 0) - } viewModel.startReAuthEventLiveData.observeData(this) { navigator.navigateToReAuthStages() } diff --git a/app/src/main/java/org/futo/circles/feature/settings/SettingsNavigator.kt b/app/src/main/java/org/futo/circles/feature/settings/SettingsNavigator.kt index 8f0e0a762e91c0d41c2ed6534233f4ee4cd9e2ca..1e095afa621d733b329e2fdcd63a11c4c3551f79 100644 --- a/app/src/main/java/org/futo/circles/feature/settings/SettingsNavigator.kt +++ b/app/src/main/java/org/futo/circles/feature/settings/SettingsNavigator.kt @@ -4,7 +4,6 @@ import androidx.navigation.fragment.findNavController import org.futo.circles.R import org.futo.circles.core.extensions.navigateSafe import org.futo.circles.core.extensions.showError -import org.futo.circles.core.utils.getSystemNoticesRoomId class SettingsNavigator(private val fragment: SettingsFragment) { @@ -18,16 +17,6 @@ class SettingsNavigator(private val fragment: SettingsFragment) { .navigateSafe(SettingsFragmentDirections.toActiveSessionsDialogFragment()) } - fun navigateToSystemNotices() { - val systemNoticesRoomId = getSystemNoticesRoomId() ?: run { - fragment.showError(fragment.getString(org.futo.circles.core.R.string.system_notices_room_not_found)) - return - } - fragment.findNavController().navigateSafe( - SettingsFragmentDirections.toSystemNoticesDialogFragment(systemNoticesRoomId) - ) - } - fun navigateToMatrixChangePassword() { fragment.findNavController() .navigateSafe(SettingsFragmentDirections.toChangePasswordDialogFragment()) diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index 519dc47064000f3e5c29d920c15086e02632a615..3a766060d2f7746ab3f770ce94e0cd19b6a110f2 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -121,51 +121,15 @@ android:layout_height="wrap_content" android:text="@string/notifications" /> - <org.futo.circles.core.view.SettingsMenuItemView + <TextView android:id="@+id/tvPushNotifications" + style="@style/settingMenuItem" android:layout_width="match_parent" android:layout_height="wrap_content" - app:optionIcon="@drawable/ic_notifications" - app:optionName="@string/push_notifications" /> + android:text="@string/push_notifications" + app:drawableStartCompat="@drawable/ic_notifications" /> - <androidx.constraintlayout.widget.ConstraintLayout - android:id="@+id/lSystemNotices" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="?selectableItemBackground" - android:clickable="true" - android:focusable="true"> - - <TextView - android:id="@+id/tvSystemNotices" - style="@style/settingMenuItem" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="@null" - android:clickable="false" - android:paddingEnd="8dp" - android:text="@string/system_notices" - app:drawableStartCompat="@drawable/ic_error" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - tools:ignore="RtlSymmetry" /> - - <org.futo.circles.core.view.NotificationCounterView - android:id="@+id/ivNoticesCount" - android:layout_width="18dp" - android:layout_height="0dp" - android:layout_marginTop="2dp" - android:background="@android:color/holo_red_dark" - android:visibility="gone" - app:layout_constraintStart_toEndOf="@id/tvSystemNotices" - app:layout_constraintTop_toTopOf="parent" - tools:visibility="visible" /> - - - </androidx.constraintlayout.widget.ConstraintLayout> - <TextView style="@style/settingMenuHeader" android:layout_width="match_parent" diff --git a/app/src/main/res/navigation/settings_nav_graph.xml b/app/src/main/res/navigation/settings_nav_graph.xml index 18e838fedbccb5547e14a613d2794c2f08395bf7..f4e9516a4a7bc25e34d310253aa49db3ca94e132 100644 --- a/app/src/main/res/navigation/settings_nav_graph.xml +++ b/app/src/main/res/navigation/settings_nav_graph.xml @@ -19,22 +19,6 @@ <action android:id="@+id/to_activeSessionsDialogFragment" app:destination="@id/log_in_sessions_nav_graph" /> - <action - android:id="@+id/to_systemNoticesDialogFragment" - app:destination="@id/systemNoticesDialogFragment"> - - <argument - android:name="roomId" - app:argType="string" - app:nullable="false" /> - - <argument - android:name="type" - android:defaultValue="Group" - app:argType="org.futo.circles.core.model.CircleRoomTypeArg" - app:nullable="false" /> - - </action> <action android:id="@+id/to_reAuthStagesDialogFragment" app:destination="@id/reAuthStagesDialogFragment" /> @@ -68,22 +52,6 @@ android:name="org.futo.circles.auth.feature.change_password.ChangePasswordDialogFragment" android:label="ChangePasswordDialogFragment" tools:layout="@layout/dialog_fragment_change_password" /> - <dialog - android:id="@+id/systemNoticesDialogFragment" - android:name="org.futo.circles.core.notices.SystemNoticesDialogFragment" - tools:layout="@layout/dialog_fragment_system_notices"> - - <argument - android:name="roomId" - app:argType="string" - app:nullable="false" /> - - <argument - android:name="type" - app:argType="org.futo.circles.core.model.CircleRoomTypeArg" - app:nullable="false" /> - - </dialog> <dialog android:id="@+id/shareRoomDialogFragment" diff --git a/core/src/main/java/org/futo/circles/core/Constants.kt b/core/src/main/java/org/futo/circles/core/Constants.kt index f1c1320088ad7b373f62cdc415725eefddd9fea6..c2f77bf1f789f91143e0a1892773c554346a51c0 100644 --- a/core/src/main/java/org/futo/circles/core/Constants.kt +++ b/core/src/main/java/org/futo/circles/core/Constants.kt @@ -3,8 +3,6 @@ package org.futo.circles.core import org.futo.circles.core.provider.MatrixSessionProvider const val FILE_PROVIDER_AUTHORITY_EXTENSION = ".provider" -const val SYSTEM_NOTICES_TAG = "m.server_notice" -const val DEFAULT_USER_PREFIX = "@notices:" const val MediaCaptionFieldKey = "caption" diff --git a/core/src/main/java/org/futo/circles/core/extensions/MatrixSessionExtensions.kt b/core/src/main/java/org/futo/circles/core/extensions/MatrixSessionExtensions.kt index 1ca9f7ce0d9b4a39cd895847801e65e3d93f2ce1..821ca5a2ac88f99b2c18e3922ac4be5f7cd33cdb 100644 --- a/core/src/main/java/org/futo/circles/core/extensions/MatrixSessionExtensions.kt +++ b/core/src/main/java/org/futo/circles/core/extensions/MatrixSessionExtensions.kt @@ -6,7 +6,6 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.flow.mapLatest -import org.futo.circles.core.DEFAULT_USER_PREFIX import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.content.ContentUrlResolver import org.matrix.android.sdk.api.session.getUser @@ -41,11 +40,6 @@ fun Session.resolveUrl( } } -fun Session.getUserIdsToExclude() = mutableListOf( - myUserId, - DEFAULT_USER_PREFIX + getServerDomain() -).toSet() - fun Session.getServerDomain() = myUserId.substringAfter(":") fun Session.getKnownUsersFlow() = @@ -55,7 +49,7 @@ fun Session.getKnownUsersFlow() = roomSummaries.forEach { summary -> summary.otherMemberIds.forEach { knowUsers.add(getOrFetchUser(it)) } } - knowUsers.toList().filterNot { getUserIdsToExclude().contains(it.userId) } + knowUsers.toList().filterNot { it.userId == myUserId } } suspend fun Session.getOrFetchUser(userId: String): User = diff --git a/core/src/main/java/org/futo/circles/core/model/SystemNoticeListItem.kt b/core/src/main/java/org/futo/circles/core/model/SystemNoticeListItem.kt deleted file mode 100644 index 934e1108720683510b8b8eb99749c8e05bd5e25c..0000000000000000000000000000000000000000 --- a/core/src/main/java/org/futo/circles/core/model/SystemNoticeListItem.kt +++ /dev/null @@ -1,9 +0,0 @@ -package org.futo.circles.core.model - -import org.futo.circles.core.list.IdEntity - -data class SystemNoticeListItem( - override val id: String, - val message: String, - val time: Long -) : IdEntity<String> \ No newline at end of file diff --git a/core/src/main/java/org/futo/circles/core/notices/SystemNoticesCountSharedViewModel.kt b/core/src/main/java/org/futo/circles/core/notices/SystemNoticesCountSharedViewModel.kt deleted file mode 100644 index 62a4db05cc3e42ce6ed80264d30760a46a1cee2a..0000000000000000000000000000000000000000 --- a/core/src/main/java/org/futo/circles/core/notices/SystemNoticesCountSharedViewModel.kt +++ /dev/null @@ -1,41 +0,0 @@ -package org.futo.circles.core.notices - -import androidx.lifecycle.ViewModel -import androidx.lifecycle.map -import dagger.hilt.android.lifecycle.HiltViewModel -import org.futo.circles.core.DEFAULT_USER_PREFIX -import org.futo.circles.core.SYSTEM_NOTICES_TAG -import org.futo.circles.core.extensions.launchBg -import org.futo.circles.core.provider.MatrixSessionProvider -import org.futo.circles.core.utils.UserUtils -import org.matrix.android.sdk.api.session.Session -import org.matrix.android.sdk.api.session.room.model.Membership -import org.matrix.android.sdk.api.session.room.roomSummaryQueryParams -import javax.inject.Inject - -@HiltViewModel -class SystemNoticesCountSharedViewModel @Inject constructor() : ViewModel() { - - val systemNoticesCountLiveData = MatrixSessionProvider.currentSession?.roomService() - ?.getRoomSummariesLive(roomSummaryQueryParams()) - ?.map { list -> list.firstOrNull { it.hasTag(SYSTEM_NOTICES_TAG) }?.notificationCount } - - init { - autoAcceptNoticeRoomInvite() - } - - private fun autoAcceptNoticeRoomInvite() { - val session = MatrixSessionProvider.currentSession ?: return - session.roomService().getRoomSummaries(roomSummaryQueryParams { - memberships = listOf(Membership.INVITE) - }).firstOrNull { it.inviterId == getNoticesUserId(session) }?.let { - launchBg { session.roomService().joinRoom(it.roomId) } - } - } - - private fun getNoticesUserId(session: Session): String { - val domain = UserUtils.getServerDomain(session.myUserId) - return DEFAULT_USER_PREFIX + domain - } - -} \ No newline at end of file diff --git a/core/src/main/java/org/futo/circles/core/notices/SystemNoticesDialogFragment.kt b/core/src/main/java/org/futo/circles/core/notices/SystemNoticesDialogFragment.kt deleted file mode 100644 index 7f22b92c66e91c186b60c3103ef98c17bea058c7..0000000000000000000000000000000000000000 --- a/core/src/main/java/org/futo/circles/core/notices/SystemNoticesDialogFragment.kt +++ /dev/null @@ -1,41 +0,0 @@ -package org.futo.circles.core.notices - -import android.os.Bundle -import android.view.View -import androidx.fragment.app.viewModels -import dagger.hilt.android.AndroidEntryPoint -import org.futo.circles.core.databinding.DialogFragmentSystemNoticesBinding -import org.futo.circles.core.extensions.observeData -import org.futo.circles.core.fragment.BaseFullscreenDialogFragment -import org.futo.circles.core.notices.list.SystemNoticesTimelineAdapter - -@AndroidEntryPoint -class SystemNoticesDialogFragment : - BaseFullscreenDialogFragment(DialogFragmentSystemNoticesBinding::inflate) { - - private val viewModel by viewModels<SystemNoticesTimelineViewModel>() - - private val binding by lazy { - getBinding() as DialogFragmentSystemNoticesBinding - } - - private val listAdapter by lazy { - SystemNoticesTimelineAdapter { viewModel.loadMore() } - } - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - setupViews() - setupObservers() - } - - private fun setupViews() { - binding.rvTimeline.adapter = listAdapter - } - - private fun setupObservers() { - viewModel.systemNoticesTimelineEventsLiveData.observeData(this) { - listAdapter.submitList(it) - } - } -} \ No newline at end of file diff --git a/core/src/main/java/org/futo/circles/core/notices/SystemNoticesTimelineViewModel.kt b/core/src/main/java/org/futo/circles/core/notices/SystemNoticesTimelineViewModel.kt deleted file mode 100644 index feba6b2bade39ec350bbf8c2b5a3dadfa5b39e38..0000000000000000000000000000000000000000 --- a/core/src/main/java/org/futo/circles/core/notices/SystemNoticesTimelineViewModel.kt +++ /dev/null @@ -1,30 +0,0 @@ -package org.futo.circles.core.notices - -import androidx.lifecycle.map -import dagger.hilt.android.lifecycle.HiltViewModel -import org.futo.circles.core.model.PostContentType -import org.futo.circles.core.model.SystemNoticeListItem -import org.futo.circles.core.model.TextContent -import org.futo.circles.core.timeline.BaseTimelineViewModel -import org.futo.circles.core.timeline.data_source.SingleTimelineDataSource -import javax.inject.Inject - -@HiltViewModel -class SystemNoticesTimelineViewModel @Inject constructor( - timelineDataSource: SingleTimelineDataSource -) : BaseTimelineViewModel(timelineDataSource) { - - val systemNoticesTimelineEventsLiveData = - timelineDataSource.timelineEventsLiveData.map { list -> - list.mapNotNull { - if (it.content.type == PostContentType.TEXT_CONTENT) - SystemNoticeListItem( - it.id, - (it.content as? TextContent)?.message ?: "", - it.postInfo.timestamp - ) - else null - } - } - -} \ No newline at end of file diff --git a/core/src/main/java/org/futo/circles/core/notices/list/SystemNoticesTimelineAdapter.kt b/core/src/main/java/org/futo/circles/core/notices/list/SystemNoticesTimelineAdapter.kt deleted file mode 100644 index 3dee08158d45ecba70324aa96c3109bfea83fac0..0000000000000000000000000000000000000000 --- a/core/src/main/java/org/futo/circles/core/notices/list/SystemNoticesTimelineAdapter.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.futo.circles.core.notices.list - - -import android.view.ViewGroup -import org.futo.circles.core.list.BaseRvAdapter -import org.futo.circles.core.model.SystemNoticeListItem - -class SystemNoticesTimelineAdapter( - private val onLoadMore: () -> Unit -) : BaseRvAdapter<SystemNoticeListItem, SystemNoticesViewHolder>(DefaultIdEntityCallback()) { - - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SystemNoticesViewHolder { - return SystemNoticesViewHolder(parent) - } - - override fun onBindViewHolder(holder: SystemNoticesViewHolder, position: Int) { - holder.bind(getItem(position)) - if (position >= itemCount - LOAD_MORE_THRESHOLD) onLoadMore() - } - - - companion object { - private const val LOAD_MORE_THRESHOLD = 10 - } - -} \ No newline at end of file diff --git a/core/src/main/java/org/futo/circles/core/notices/list/SystemNoticesViewHolder.kt b/core/src/main/java/org/futo/circles/core/notices/list/SystemNoticesViewHolder.kt deleted file mode 100644 index fba7f8b77666e085b8b4a83a847e288d4edccd1b..0000000000000000000000000000000000000000 --- a/core/src/main/java/org/futo/circles/core/notices/list/SystemNoticesViewHolder.kt +++ /dev/null @@ -1,25 +0,0 @@ -package org.futo.circles.core.notices.list - -import android.view.ViewGroup -import androidx.recyclerview.widget.RecyclerView -import org.futo.circles.core.databinding.ListItemSystemNoticesBinding -import org.futo.circles.core.list.ViewBindingHolder -import org.futo.circles.core.model.SystemNoticeListItem -import java.text.DateFormat -import java.util.Date - -class SystemNoticesViewHolder( - parent: ViewGroup -) : RecyclerView.ViewHolder(inflate(parent, ListItemSystemNoticesBinding::inflate)) { - - private companion object : ViewBindingHolder - - private val binding = baseBinding as ListItemSystemNoticesBinding - - fun bind(data: SystemNoticeListItem) { - with(binding) { - tvMessage.text = data.message - tvTime.text = DateFormat.getDateTimeInstance().format(Date(data.time)) - } - } -} \ No newline at end of file diff --git a/core/src/main/java/org/futo/circles/core/select_users/SelectUsersDataSource.kt b/core/src/main/java/org/futo/circles/core/select_users/SelectUsersDataSource.kt index 7b604713af9e614c177a4945dfe0a13f9f535beb..e6652582e041c91fb92806e0cca1e98c0e1d92ca 100644 --- a/core/src/main/java/org/futo/circles/core/select_users/SelectUsersDataSource.kt +++ b/core/src/main/java/org/futo/circles/core/select_users/SelectUsersDataSource.kt @@ -7,7 +7,6 @@ import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.flowOn -import org.futo.circles.core.extensions.getUserIdsToExclude import org.futo.circles.core.mapping.toUserListItem import org.futo.circles.core.model.CirclesUserSummary import org.futo.circles.core.model.HeaderItem @@ -34,7 +33,7 @@ class SelectUsersDataSource @Inject constructor( private val room = session?.getRoom(roomId ?: "") private val existingMembersIds = mutableListOf<String>().apply { - addAll(session?.getUserIdsToExclude() ?: emptySet()) + session?.myUserId?.let { add(it)} addAll(room?.membershipService()?.getRoomMembers( roomMemberQueryParams { memberships = listOf(Membership.JOIN, Membership.INVITE, Membership.BAN) diff --git a/core/src/main/java/org/futo/circles/core/utils/RoomUtils.kt b/core/src/main/java/org/futo/circles/core/utils/RoomUtils.kt index 2a9f0e7e5cf7a607ff80842937e0a4722cf11414..7acd180b7509d7112076d236b198f9b964f2cf5e 100644 --- a/core/src/main/java/org/futo/circles/core/utils/RoomUtils.kt +++ b/core/src/main/java/org/futo/circles/core/utils/RoomUtils.kt @@ -1,6 +1,5 @@ package org.futo.circles.core.utils -import org.futo.circles.core.SYSTEM_NOTICES_TAG import org.futo.circles.core.model.TIMELINE_TYPE import org.futo.circles.core.provider.MatrixSessionProvider import org.matrix.android.sdk.api.session.getRoom @@ -26,8 +25,6 @@ fun getTimelineRoomFor(circleId: String): Room? { fun getTimelineRoomIdOrThrow(circleId: String) = getTimelineRoomFor(circleId)?.roomId ?: throw IllegalArgumentException("Timeline not found") -fun getSystemNoticesRoomId(): String? = getJoinedRoomIdByTag(SYSTEM_NOTICES_TAG) - fun getJoinedRoomIdByTag(tag: String, includeSpace: Boolean = false): String? { val session = MatrixSessionProvider.currentSession ?: return null return session.roomService().getRoomSummaries(roomSummaryQueryParams { diff --git a/core/src/main/res/layout/dialog_fragment_system_notices.xml b/core/src/main/res/layout/dialog_fragment_system_notices.xml deleted file mode 100644 index 962a1815ad46e02c95373e5069734a72db7fc462..0000000000000000000000000000000000000000 --- a/core/src/main/res/layout/dialog_fragment_system_notices.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <com.google.android.material.appbar.MaterialToolbar - android:id="@+id/toolbar" - android:layout_width="0dp" - android:layout_height="?attr/actionBarSize" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:navigationIcon="?attr/homeAsUpIndicator" - app:title="@string/system_notices" - app:titleCentered="true" /> - - <View - android:id="@+id/toolbarDivider" - android:layout_width="0dp" - android:layout_height="@dimen/divider_height" - android:background="@color/divider_color" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/toolbar" /> - - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/rvTimeline" - android:layout_width="0dp" - android:layout_height="0dp" - android:clipChildren="false" - android:clipToPadding="false" - app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/toolbarDivider" /> - -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/core/src/main/res/layout/list_item_system_notices.xml b/core/src/main/res/layout/list_item_system_notices.xml deleted file mode 100644 index 1bacb774fe10628bffc4d44b35c96d560f0d6031..0000000000000000000000000000000000000000 --- a/core/src/main/res/layout/list_item_system_notices.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" - android:layout_marginEnd="36dp"> - - <com.google.android.material.imageview.ShapeableImageView - android:id="@+id/ivBackground" - android:layout_width="0dp" - android:layout_height="0dp" - android:background="@color/chip_selected_color" - app:layout_constraintBottom_toBottomOf="@id/tvTime" - app:layout_constraintEnd_toEndOf="@id/tvMessage" - app:layout_constraintStart_toStartOf="@id/tvMessage" - app:layout_constraintTop_toTopOf="@id/tvMessage" - app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.Message" /> - - <TextView - android:id="@+id/tvMessage" - style="@style/body" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:autoLink="web" - android:padding="8dp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - tools:text="sadasdasdasdasdasdasdasdasdasd" /> - - <TextView - android:id="@+id/tvTime" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginEnd="8dp" - android:paddingBottom="4dp" - android:textSize="12sp" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toBottomOf="@id/tvMessage" - tools:text="sadasdasdasdasdasdasdasdasdasd" /> - -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 69a7cf05417f4b5344a0abea1c69345782b98717..9d39d6f217cc0cfb5076c7ecb97080cee3eb19f2 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -56,8 +56,6 @@ <string name="choose_gallery">Choose gallery</string> <string name="pick_media">Pick media</string> <string name="change_icon">Change icon</string> - <string name="system_notices">System notices</string> - <string name="system_notices_room_not_found">System notices room not found.</string> <string name="account">Account</string> <string name="clear_cache_and_reload">Clear cache and reload</string> <string name="deactivate_my_account">Deactivate my account</string>