Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e68bb791f7 | |||
| 2297a72e29 | |||
| 5aabb40c48 | |||
| 53aa3c3ccb | |||
| 47cbdc6a44 | |||
| 8d6147761b | |||
| 9d6abfd979 | |||
| 46f4324478 | |||
| bfeab57744 | |||
| 2e99926e82 | |||
| 76e4c59119 | |||
| 33b69b9f3a | |||
| b4f5e2d124 |
@@ -59,6 +59,8 @@ jobs:
|
||||
rm build/outputs/apk/foss/release/*universal*
|
||||
./gradlew assembleGplayRelease
|
||||
mv build/outputs/apk/gplay/release/*universal* build/outputs/apk/foss/release/ArcaneChat-gplay.apk
|
||||
mv build/outputs/mapping/fossRelease/mapping.txt build/outputs/mapping/fossRelease/mapping-foss.txt
|
||||
mv build/outputs/mapping/gplayRelease/mapping.txt build/outputs/mapping/fossRelease/mapping-gplay.txt
|
||||
|
||||
- name: Release on GitHub
|
||||
uses: softprops/action-gh-release@v1
|
||||
@@ -67,7 +69,9 @@ jobs:
|
||||
body: '[<img src="store/get-it-on-gplay.png" alt="Get it on Google Play" height="48">](https://play.google.com/store/apps/details?id=com.github.arcanechat) [<img src="store/get-it-on-fdroid.png" alt="Get it on F-Droid" height="48">](https://f-droid.org/packages/chat.delta.lite) [<img src="store/get-it-on-github.png" alt="Get it on GitHub" height="48">](https://github.com/ArcaneChat/android/releases/latest/download/ArcaneChat-gplay.apk)'
|
||||
prerelease: ${{ contains(github.event.ref, '-beta') }}
|
||||
fail_on_unmatched_files: true
|
||||
files: build/outputs/apk/foss/release/*.apk
|
||||
files: |
|
||||
build/outputs/apk/foss/release/*.apk
|
||||
build/outputs/mapping/fossRelease/mapping-*.txt
|
||||
|
||||
- name: Release on ZapStore
|
||||
run: |
|
||||
|
||||
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 287 KiB After Width: | Height: | Size: 283 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 250 KiB |
|
Before Width: | Height: | Size: 447 KiB After Width: | Height: | Size: 446 KiB |
@@ -6,3 +6,4 @@ find ./src/main/assets/help/ -type f -name '*.html' | xargs sed -i 's/Delta Chat
|
||||
find ./src/ -type f -name 'strings.xml' | xargs sed -i 's/get.delta.chat/github.com\/ArcaneChat/g'
|
||||
find ./src/ -type f -name 'strings.xml' | xargs sed -i 's/delta.chat\/donate/arcanechat.me\/#contribute/g'
|
||||
find ./src/ -type f -name 'strings.xml' | xargs sed -i 's/Delta Chat/ArcaneChat/g'
|
||||
find ./src/ -type f -name 'strings.xml' | xargs sed -i 's/❤️/💜/g'
|
||||
|
||||
@@ -6,6 +6,7 @@ find ./src/main/assets/help/ -type f -name '*.html' | xargs sed -i 's/ArcaneChat
|
||||
find ./src/ -type f -name 'strings.xml' | xargs sed -i 's/github.com\/ArcaneChat/get.delta.chat/g'
|
||||
find ./src/ -type f -name 'strings.xml' | xargs sed -i 's/arcanechat.me\/#contribute/delta.chat\/donate/g'
|
||||
find ./src/ -type f -name 'strings.xml' | xargs sed -i 's/ArcaneChat/Delta Chat/g'
|
||||
find ./src/ -type f -name 'strings.xml' | xargs sed -i 's/💜/❤️/g'
|
||||
|
||||
# don't revert the app name
|
||||
sed -i 's/>Delta Chat</>ArcaneChat</g' ./src/main/res/values/strings.xml
|
||||
|
||||
@@ -786,6 +786,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
return future;
|
||||
}
|
||||
|
||||
inputPanel.setSubject(draft.getSubject());
|
||||
|
||||
final String text = TextUtils.isEmpty(sharedText)? draft.getText() : sharedText;
|
||||
if(!text.isEmpty()) {
|
||||
composeText.setText(text);
|
||||
@@ -977,10 +979,12 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
if (dcChat.canSend()) {
|
||||
composePanel.setVisibility(View.VISIBLE);
|
||||
attachmentManager.setHidden(false);
|
||||
inputPanel.setSubjectVisible(!dcChat.isEncrypted());
|
||||
} else {
|
||||
composePanel.setVisibility(View.GONE);
|
||||
attachmentManager.setHidden(true);
|
||||
hideSoftKeyboard();
|
||||
inputPanel.setSubjectVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1063,12 +1067,14 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
|
||||
Optional<QuoteModel> quote = inputPanel.getQuote();
|
||||
boolean editing = isEditing;
|
||||
final String subject = inputPanel.getSubject();
|
||||
|
||||
// for a quick ui feedback, we clear the related controls immediately on sending messages.
|
||||
// for drafts, however, we do not change the controls, the activity may be resumed.
|
||||
if (action==ACTION_SEND_OUT) {
|
||||
composeText.setText("");
|
||||
inputPanel.clearQuote();
|
||||
inputPanel.clearSubject();
|
||||
}
|
||||
|
||||
Util.runOnAnyBackgroundThread(() -> {
|
||||
@@ -1133,6 +1139,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
msg.setQuote(quote.get().getQuotedMsg());
|
||||
}
|
||||
|
||||
if (!subject.isEmpty() && msg != null) {
|
||||
msg.setSubject(subject);
|
||||
}
|
||||
|
||||
if (action==ACTION_SEND_OUT) {
|
||||
|
||||
// for WEBXDC, drafts are just sent out as is.
|
||||
|
||||
@@ -411,8 +411,11 @@ public class ConversationItem extends BaseConversationItem
|
||||
bodyText.setClickable(false);
|
||||
bodyText.setFocusable(false);
|
||||
|
||||
String subject = messageRecord.getSubject();
|
||||
String text = messageRecord.getText();
|
||||
|
||||
if (!subject.isEmpty() && messageRecord.isOutgoing() && !messageRecord.isSecure()) text = subject + "\n\n" + text;
|
||||
|
||||
if (messageRecord.getType() == DcMsg.DC_MSG_CALL || text.isEmpty()) {
|
||||
bodyText.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ public class InputPanel extends ConstraintLayout
|
||||
private QuoteView quoteView;
|
||||
private EmojiToggle emojiToggle;
|
||||
private ComposeText composeText;
|
||||
private android.widget.EditText subjectText;
|
||||
private View quickCameraToggle;
|
||||
private View quickAudioToggle;
|
||||
private View buttonToggle;
|
||||
@@ -91,6 +92,7 @@ public class InputPanel extends ConstraintLayout
|
||||
this.quoteView = findViewById(R.id.quote_view);
|
||||
this.emojiToggle = findViewById(R.id.emoji_toggle);
|
||||
this.composeText = findViewById(R.id.embedded_text_editor);
|
||||
this.subjectText = findViewById(R.id.subject_text);
|
||||
this.quickCameraToggle = findViewById(R.id.quick_camera_toggle);
|
||||
this.quickAudioToggle = findViewById(R.id.quick_audio_toggle);
|
||||
this.buttonToggle = findViewById(R.id.button_toggle);
|
||||
@@ -198,6 +200,31 @@ public class InputPanel extends ConstraintLayout
|
||||
composeText.performClick();
|
||||
}
|
||||
|
||||
public void setSubjectVisible(boolean visible) {
|
||||
subjectText.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
// don't make it visible if visible is false to avoid showing it while recording audio and an event triggers setSubjectVisible(false)
|
||||
if (visible) emojiToggle.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public String getSubject() {
|
||||
if (subjectText != null && subjectText.getVisibility() == View.VISIBLE) {
|
||||
return subjectText.getText().toString().trim();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public void clearSubject() {
|
||||
if (subjectText != null) {
|
||||
subjectText.setText("");
|
||||
}
|
||||
}
|
||||
|
||||
public void setSubject(String subject) {
|
||||
if (subjectText != null && subject != null) {
|
||||
subjectText.setText(subject);
|
||||
}
|
||||
}
|
||||
|
||||
public void setMediaKeyboard(@NonNull MediaKeyboard mediaKeyboard) {
|
||||
mediaKeyboard.setKeyboardListener(this);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,27 @@ public final class FetchForegroundService extends Service {
|
||||
.setSmallIcon(R.drawable.notification_permanent)
|
||||
.build();
|
||||
|
||||
startForeground(NotificationCenter.ID_FETCH, notification);
|
||||
try {
|
||||
startForeground(NotificationCenter.ID_FETCH, notification);
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Failed to start foreground service, falling back to synchronous fetch", e);
|
||||
synchronized (SERVICE_LOCK) {
|
||||
service = null;
|
||||
}
|
||||
stopSelf();
|
||||
// Fallback to synchronous fetching when foreground service fails
|
||||
fetchingSynchronously = true;
|
||||
if (ApplicationContext.getDcAccounts().backgroundFetch(10)) {
|
||||
synchronized (STOP_NOTIFIER) {
|
||||
while (fetchingSynchronously) {
|
||||
try {
|
||||
STOP_NOTIFIER.wait();
|
||||
} catch (InterruptedException ex) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Util.runOnAnyBackgroundThread(() -> {
|
||||
Log.i(TAG, "Starting fetch");
|
||||
|
||||
@@ -25,11 +25,28 @@
|
||||
app:message_type="preview"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/subject_text"
|
||||
style="@style/ComposeEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:hint="@string/subject"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/quote_view"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/input_field_frame_layout"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/button_toggle"
|
||||
app:layout_constraintTop_toBottomOf="@id/quote_view"
|
||||
app:layout_constraintTop_toBottomOf="@id/subject_text"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -3,8 +3,11 @@
|
||||
<external-cache-path name="external_cache" path="." />
|
||||
<external-files-path name="external_files" path="." />
|
||||
|
||||
<!-- this is needed for access to the cache dir in SD card -->
|
||||
<root-path name="external_root" path="/storage/" />
|
||||
|
||||
<external-path name="external_pictures" path="Pictures"/>
|
||||
<external-path name="external_video" path="Movies"/>
|
||||
<external-path name="external_audio" path="Music"/>
|
||||
<external-path name="external_download" path="Download"/>
|
||||
</paths>
|
||||
</paths>
|
||||
|
||||