Some chan improvements
- When replying on a chan, the receiving address isn't used as the sending identity - Chans are listed as contacts as well
This commit is contained in:
parent
b34e678c68
commit
96af8e0750
@ -18,8 +18,8 @@ android {
|
|||||||
applicationId "ch.dissem.apps." + appName.toLowerCase()
|
applicationId "ch.dissem.apps." + appName.toLowerCase()
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 9
|
versionCode 11
|
||||||
versionName "1.0-beta9"
|
versionName "1.0-beta11"
|
||||||
jackOptions.enabled = false
|
jackOptions.enabled = false
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
@ -28,8 +28,8 @@ android {
|
|||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled false
|
||||||
shrinkResources true
|
shrinkResources false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,8 @@ import android.support.v4.app.Fragment;
|
|||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
|
|
||||||
|
import ch.dissem.apps.abit.service.Singleton;
|
||||||
|
import ch.dissem.bitmessage.entity.BitmessageAddress;
|
||||||
import ch.dissem.bitmessage.entity.Plaintext;
|
import ch.dissem.bitmessage.entity.Plaintext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,7 +70,13 @@ public class ComposeMessageActivity extends AppCompatActivity {
|
|||||||
private static Intent getReplyIntent(Context ctx, Plaintext item) {
|
private static Intent getReplyIntent(Context ctx, Plaintext item) {
|
||||||
Intent replyIntent = new Intent(ctx, ComposeMessageActivity.class);
|
Intent replyIntent = new Intent(ctx, ComposeMessageActivity.class);
|
||||||
replyIntent.putExtra(EXTRA_RECIPIENT, item.getFrom());
|
replyIntent.putExtra(EXTRA_RECIPIENT, item.getFrom());
|
||||||
replyIntent.putExtra(EXTRA_IDENTITY, item.getTo());
|
BitmessageAddress receivingIdentity = item.getTo();
|
||||||
|
if (receivingIdentity.isChan()) {
|
||||||
|
// I hate when people send as chan, so it won't be the default behaviour.
|
||||||
|
replyIntent.putExtra(EXTRA_IDENTITY, Singleton.getIdentity(ctx));
|
||||||
|
} else {
|
||||||
|
replyIntent.putExtra(EXTRA_IDENTITY, receivingIdentity);
|
||||||
|
}
|
||||||
String prefix;
|
String prefix;
|
||||||
if (item.getSubject().length() >= 3 && item.getSubject().substring(0, 3)
|
if (item.getSubject().length() >= 3 && item.getSubject().substring(0, 3)
|
||||||
.equalsIgnoreCase("RE:")) {
|
.equalsIgnoreCase("RE:")) {
|
||||||
|
@ -110,7 +110,7 @@ public class AndroidAddressRepository implements AddressRepository {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BitmessageAddress> getContacts() {
|
public List<BitmessageAddress> getContacts() {
|
||||||
return find("private_key IS NULL");
|
return find("private_key IS NULL OR chan = '1'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<BitmessageAddress> find(String where) {
|
private List<BitmessageAddress> find(String where) {
|
||||||
|
Loading…
Reference in New Issue
Block a user