Skip to content
Snippets Groups Projects
Verified Commit 3a235bf9 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Prepare for adding new chat archive screen

parent 63b2416b
No related branches found
No related tags found
No related merge requests found
Showing with 409 additions and 6 deletions
...@@ -112,6 +112,13 @@ ...@@ -112,6 +112,13 @@
android:label="@string/label_info_certificate" android:label="@string/label_info_certificate"
android:windowSoftInputMode="adjustResize" /> android:windowSoftInputMode="adjustResize" />
<!-- Archive -->
<activity
android:name="de.kuschku.quasseldroid.ui.chat.archive.ArchiveActivity"
android:exported="false"
android:label="@string/label_archived_chats"
android:windowSoftInputMode="adjustResize" />
<!-- Add --> <!-- Add -->
<activity <activity
android:name="de.kuschku.quasseldroid.ui.chat.add.create.ChannelCreateActivity" android:name="de.kuschku.quasseldroid.ui.chat.add.create.ChannelCreateActivity"
......
/*
* Quasseldroid - Quassel client for Android
*
* Copyright (c) 2019 Janne Koschinski
* Copyright (c) 2019 The Quassel Project
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.kuschku.quasseldroid.ui.chat.archive
import android.content.Context
import android.content.Intent
import de.kuschku.quasseldroid.util.ui.settings.ServiceBoundSettingsActivity
class ArchiveActivity : ServiceBoundSettingsActivity(ArchiveFragment()) {
companion object {
fun launch(
context: Context,
chatlistId: Int? = null
) = context.startActivity(intent(context, chatlistId))
fun intent(
context: Context,
chatlistId: Int? = null
) = Intent(context, ArchiveActivity::class.java).apply {
if (chatlistId != null) {
putExtra("chatlist_id", chatlistId)
}
}
}
}
/*
* Quasseldroid - Quassel client for Android
*
* Copyright (c) 2019 Janne Koschinski
* Copyright (c) 2019 The Quassel Project
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.kuschku.quasseldroid.ui.chat.archive
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import butterknife.ButterKnife
import de.kuschku.quasseldroid.R
import de.kuschku.quasseldroid.util.service.ServiceBoundFragment
import de.kuschku.quasseldroid.viewmodel.helper.QuasselViewModelHelper
import javax.inject.Inject
class ArchiveFragment : ServiceBoundFragment() {
@Inject
lateinit var modelHelper: QuasselViewModelHelper
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? {
val view = inflater.inflate(R.layout.add_join, container, false)
ButterKnife.bind(this, view)
return view
}
}
/*
* Quasseldroid - Quassel client for Android
*
* Copyright (c) 2019 Janne Koschinski
* Copyright (c) 2019 The Quassel Project
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.kuschku.quasseldroid.ui.chat.archive
import androidx.fragment.app.FragmentActivity
import dagger.Binds
import dagger.Module
import dagger.android.ContributesAndroidInjector
@Module
abstract class ArchiveFragmentProvider {
@Binds
abstract fun bindFragmentActivity(activity: ArchiveActivity): FragmentActivity
@ContributesAndroidInjector
abstract fun bindArchiveFragment(): ArchiveFragment
}
<?xml version="1.0" encoding="utf-8"?><!--
Quasseldroid - Quassel client for Android
Copyright (c) 2019 Janne Koschinski
Copyright (c) 2019 The Quassel Project
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3 as published
by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<androidx.core.widget.NestedScrollView 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:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout style="@style/Widget.CoreSettings.PrimaryItemGroupHeader">
<androidx.appcompat.widget.AppCompatImageView
style="@style/Widget.CoreSettings.PrimaryItemIcon"
app:srcCompat="@drawable/ic_clock" />
<TextView
style="@style/Widget.CoreSettings.PrimaryItemSwitch"
android:text="@string/label_temporarily_archived" />
</LinearLayout>
<TextView
style="@style/Widget.CoreSettings.TextView"
android:layout_marginStart="72dp"
android:layout_marginLeft="72dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:text="@string/label_temporarily_archived_long" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:listitem="@layout/widget_buffer_reorder" />
<LinearLayout style="@style/Widget.CoreSettings.PrimaryItemGroupHeader">
<androidx.appcompat.widget.AppCompatImageView
style="@style/Widget.CoreSettings.PrimaryItemIcon"
app:srcCompat="@drawable/ic_eye_off" />
<TextView
style="@style/Widget.CoreSettings.PrimaryItemSwitch"
android:text="@string/label_permanently_archived" />
</LinearLayout>
<TextView
style="@style/Widget.CoreSettings.TextView"
android:layout_marginStart="72dp"
android:layout_marginLeft="72dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:text="@string/label_permanently_archived_long" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:listitem="@layout/widget_buffer_reorder" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
android:paddingBottom="4dp" android:paddingBottom="4dp"
android:textAppearance="?android:attr/textAppearanceListItemSmall"> android:textAppearance="?android:attr/textAppearanceListItemSmall">
<ImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/status" android:id="@+id/status"
android:layout_width="@dimen/avatar_size_buffer" android:layout_width="@dimen/avatar_size_buffer"
android:layout_height="@dimen/avatar_size_buffer" android:layout_height="@dimen/avatar_size_buffer"
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
android:paddingBottom="4dp" android:paddingBottom="4dp"
android:textAppearance="?android:attr/textAppearanceListItemSmall"> android:textAppearance="?android:attr/textAppearanceListItemSmall">
<ImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/status" android:id="@+id/status"
android:layout_width="@dimen/avatar_size_buffer" android:layout_width="@dimen/avatar_size_buffer"
android:layout_height="@dimen/avatar_size_buffer" android:layout_height="@dimen/avatar_size_buffer"
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginRight="16dp" android:layout_marginRight="16dp"
android:contentDescription="@string/label_avatar" android:contentDescription="@string/label_avatar"
tools:src="@drawable/ic_status_channel" /> tools:src="@tools:sample/avatars" />
<LinearLayout <LinearLayout
android:layout_width="0dip" android:layout_width="0dip"
......
<?xml version="1.0" encoding="utf-8"?><!--
Quasseldroid - Quassel client for Android
Copyright (c) 2019 Janne Koschinski
Copyright (c) 2019 The Quassel Project
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3 as published
by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout 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="56dp"
android:layout_marginLeft="56dp"
android:background="?attr/backgroundMenuItem"
android:minHeight="?listPreferredItemHeightSmall"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingTop="4dp"
android:paddingRight="16dp"
android:paddingBottom="4dp"
android:textAppearance="?android:attr/textAppearanceListItemSmall">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/status"
android:layout_width="@dimen/avatar_size_buffer"
android:layout_height="@dimen/avatar_size_buffer"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:contentDescription="@string/label_avatar"
tools:src="@tools:sample/avatars" />
<LinearLayout
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/name"
style="@style/Widget.RtlConformTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|start"
android:ellipsize="marquee"
android:fontFamily="sans-serif-medium"
android:singleLine="true"
android:textColor="?attr/colorTextPrimary"
android:textSize="13sp"
tools:text="@sample/messages.json/data/sender" />
<TextView
android:id="@+id/description"
style="@style/Widget.RtlConformTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
android:textColor="?attr/colorTextSecondary"
android:textSize="12sp"
tools:text="@sample/messages.json/data/sender"
tools:visibility="visible" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/reorder"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:contentDescription="@string/label_reorder"
app:srcCompat="@drawable/ic_reorder"
app:tint="?colorTextSecondary" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?><!--
Quasseldroid - Quassel client for Android
Copyright (c) 2019 Janne Koschinski
Copyright (c) 2019 The Quassel Project
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3 as published
by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout 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="56dp"
android:layout_marginLeft="56dp"
android:background="?attr/backgroundMenuItem"
android:minHeight="?listPreferredItemHeightSmall"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingTop="4dp"
android:paddingRight="16dp"
android:paddingBottom="4dp"
android:textAppearance="?android:attr/textAppearanceListItemSmall">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/status"
android:layout_width="@dimen/avatar_size_buffer"
android:layout_height="@dimen/avatar_size_buffer"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:contentDescription="@string/label_avatar"
tools:src="@tools:sample/avatars" />
<LinearLayout
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/name"
style="@style/Widget.RtlConformTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|start"
android:ellipsize="marquee"
android:fontFamily="sans-serif-medium"
android:singleLine="true"
android:textColor="?attr/colorTextSecondary"
android:textSize="13sp"
android:textStyle="italic"
tools:text="@sample/messages.json/data/sender" />
<TextView
android:id="@+id/description"
style="@style/Widget.RtlConformTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
android:textColor="?attr/colorTextSecondary"
android:textSize="12sp"
android:textStyle="italic"
tools:text="@sample/messages.json/data/sender"
tools:visibility="visible" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:contentDescription="@string/label_user_away"
app:srcCompat="@drawable/ic_clock"
app:tint="?colorTextSecondary" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/reorder"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:contentDescription="@string/label_reorder"
app:srcCompat="@drawable/ic_reorder"
app:tint="?colorTextSecondary" />
</LinearLayout>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<string name="label_connect">Connetti</string> <string name="label_connect">Connetti</string>
<string name="label_copy">Copia</string> <string name="label_copy">Copia</string>
<string name="label_crashes">Arresti anomali</string> <string name="label_crashes">Arresti anomali</string>
<string name="label_crashes_empty">Nessun rapporto di arresto anomalo trovato</string> <string name="label_crashes_empty">Nessun rapporto darresto anomalo trovato</string>
<string name="label_create_channel">Crea canale</string> <string name="label_create_channel">Crea canale</string>
<string name="label_delete">Elimina</string> <string name="label_delete">Elimina</string>
<string name="label_delete_all">Elimina tutto</string> <string name="label_delete_all">Elimina tutto</string>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<string name="label_edit_topic_long">Apri finestra di dialogo per cambiare l’argomento del canale</string> <string name="label_edit_topic_long">Apri finestra di dialogo per cambiare l’argomento del canale</string>
<string name="label_filter_messages">Filtro messaggi</string> <string name="label_filter_messages">Filtro messaggi</string>
<string name="label_finish">Finito</string> <string name="label_finish">Finito</string>
<string name="label_generate_crash_report">Genera rapporto dell’arresto anomalo</string> <string name="label_generate_crash_report">Genera rapporto d’arresto anomalo</string>
<string name="label_hide_perm">Nascondi sempre</string> <string name="label_hide_perm">Nascondi sempre</string>
<string name="label_hide_temp">Nascondi temporaneamente</string> <string name="label_hide_temp">Nascondi temporaneamente</string>
<string name="label_ignore">Ignora</string> <string name="label_ignore">Ignora</string>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<string name="label_settings_client">Impostazioni del client</string> <string name="label_settings_client">Impostazioni del client</string>
<string name="label_settings_core">Impostazioni del core</string> <string name="label_settings_core">Impostazioni del core</string>
<string name="label_share">Condividi</string> <string name="label_share">Condividi</string>
<string name="label_share_crashreport">Condividi rapporto dell’arresto anomalo</string> <string name="label_share_crashreport">Condividi rapporto d’arresto anomalo</string>
<string name="label_shortcut">Scorciatoia</string> <string name="label_shortcut">Scorciatoia</string>
<string name="label_shortcut_long">Crea scorciatoia nella schermata Home</string> <string name="label_shortcut_long">Crea scorciatoia nella schermata Home</string>
<string name="label_show_hidden">Mostra nascosti</string> <string name="label_show_hidden">Mostra nascosti</string>
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<string name="label_about">About</string> <string name="label_about">About</string>
<string name="label_accept">Accept</string> <string name="label_accept">Accept</string>
<string name="label_acknowledgements">Acknowledgements</string> <string name="label_acknowledgements">Acknowledgements</string>
<string name="label_archived_chats">Archived Chats</string>
<string name="label_ascending">Ascending</string> <string name="label_ascending">Ascending</string>
<string name="label_authors">Authors</string> <string name="label_authors">Authors</string>
<string name="label_autocomplete">Autocomplete</string> <string name="label_autocomplete">Autocomplete</string>
...@@ -102,6 +103,8 @@ ...@@ -102,6 +103,8 @@
<string name="label_password_new">New Password</string> <string name="label_password_new">New Password</string>
<string name="label_password_old">Old Password</string> <string name="label_password_old">Old Password</string>
<string name="label_password_repeat">Repeat Password</string> <string name="label_password_repeat">Repeat Password</string>
<string name="label_permanently_archived">Permanently Archived</string>
<string name="label_permanently_archived_long">Permanently archived chats stay hidden until you manually choose to un-archive them.</string>
<string name="label_placeholder_message">Write a message…</string> <string name="label_placeholder_message">Write a message…</string>
<string name="label_placeholder_topic">Describe the channel topic…</string> <string name="label_placeholder_topic">Describe the channel topic…</string>
<string name="label_privacy_policy">Privacy Policy</string> <string name="label_privacy_policy">Privacy Policy</string>
...@@ -109,6 +112,7 @@ ...@@ -109,6 +112,7 @@
<string name="label_query_long">Open private chat with user</string> <string name="label_query_long">Open private chat with user</string>
<string name="label_query_medium">Open private chat</string> <string name="label_query_medium">Open private chat</string>
<string name="label_rename">Rename</string> <string name="label_rename">Rename</string>
<string name="label_reorder">Reorder</string>
<string name="label_reply">Reply</string> <string name="label_reply">Reply</string>
<string name="label_reset">Reset</string> <string name="label_reset">Reset</string>
<string name="label_save">Save</string> <string name="label_save">Save</string>
...@@ -130,6 +134,8 @@ ...@@ -130,6 +134,8 @@
<string name="label_show_hidden">Show Hidden</string> <string name="label_show_hidden">Show Hidden</string>
<string name="label_sort">Sort</string> <string name="label_sort">Sort</string>
<string name="label_source">Source</string> <string name="label_source">Source</string>
<string name="label_temporarily_archived">Temporarily Archived</string>
<string name="label_temporarily_archived_long">Chats which are temporarily archived will be shown again once they get a new message.</string>
<string name="label_topic">Channel Topic</string> <string name="label_topic">Channel Topic</string>
<string name="label_translators">Translators</string> <string name="label_translators">Translators</string>
<string name="label_unhide">Make Visible</string> <string name="label_unhide">Make Visible</string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment