mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
add function 'mark all as read' to archive (#2443)
* add function 'mark all as read' to archive as we have the unread counter there now, we should have an easy way to reset it. * more clear strings-key
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item android:title="@string/mark_all_as_read"
|
||||
android:id="@+id/mark_as_read"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
</menu>
|
||||
@@ -48,6 +48,9 @@
|
||||
<string name="start_chat">Start Chat</string>
|
||||
<string name="show_full_message">Show Full Message…</string>
|
||||
<string name="show_full_message_in_browser">Show Full Message in Browser…</string>
|
||||
<string name="mark_all_as_read">Mark All as Read</string>
|
||||
<!-- Shortest text for "Mark as being read". In english, this could be "Read" (past tense of "to read"), in german, this could be "Gelesen". -->
|
||||
<string name="mark_as_read_short">Read</string>
|
||||
<!-- Placeholder text when something is loading -->
|
||||
<string name="loading">Loading…</string>
|
||||
<string name="hide">Hide</string>
|
||||
|
||||
@@ -2,8 +2,13 @@ package org.thoughtcrime.securesms;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import com.b44t.messenger.DcChat;
|
||||
|
||||
import org.thoughtcrime.securesms.connect.DcHelper;
|
||||
import org.thoughtcrime.securesms.util.DynamicLanguage;
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
||||
|
||||
@@ -57,12 +62,28 @@ public class ConversationListArchiveActivity extends PassphraseRequiredActionBar
|
||||
dynamicLanguage.onResume(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater = this.getMenuInflater();
|
||||
menu.clear();
|
||||
|
||||
inflater.inflate(R.menu.archived_list, menu);
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
super.onOptionsItemSelected(item);
|
||||
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home: super.onBackPressed(); return true;
|
||||
case android.R.id.home:
|
||||
super.onBackPressed();
|
||||
return true;
|
||||
|
||||
case R.id.mark_as_read:
|
||||
DcHelper.getContext(this).marknoticedChat(DcChat.DC_CHAT_ID_ARCHIVED_LINK);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user