Release 2.25.0

This commit is contained in:
tom79 2019-11-16 18:36:08 +01:00
parent 58f17dfa1d
commit f63ea0db01
9 changed files with 59 additions and 102 deletions

View File

@ -6,8 +6,8 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 29
versionCode 335
versionName "2.25.0-beta-3"
versionCode 336
versionName "2.25.0"
multiDexEnabled true
renderscriptTargetApi 28 as int
renderscriptSupportModeEnabled true

View File

@ -66,11 +66,9 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
private List<Account> developers = new ArrayList<>();
private List<Account> contributors = new ArrayList<>();
private List<Account> designers = new ArrayList<>();
private List<Account> uxuidesigners = new ArrayList<>();
private AccountSearchDevAdapter accountSearchWebAdapterDeveloper;
private AccountSearchDevAdapter accountSearchWebAdapterDesigner;
private AccountSearchDevAdapter accountSearchWebAdapterContributors;
private AccountSearchDevAdapter accountSearchWebAdapterUxUiDesigners;
@ -120,7 +118,6 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
}
ExpandableHeightListView lv_developers = findViewById(R.id.lv_developers);
ExpandableHeightListView lv_designers = findViewById(R.id.lv_designers);
ExpandableHeightListView lv_contributors = findViewById(R.id.lv_contributors);
ExpandableHeightListView lv_ux = findViewById(R.id.lv_ux);
@ -130,10 +127,10 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
Button about_trunk = findViewById(R.id.about_trunk);
TextView txt_developers, txt_ux, txt_designers, txt_thankyou1, txt_thankyou2;
TextView txt_developers, txt_ux, txt_thankyou3, txt_thankyou1, txt_thankyou2;
txt_developers = findViewById(R.id.txt_developers);
txt_ux = findViewById(R.id.txt_ux);
txt_designers = findViewById(R.id.txt_designers);
txt_thankyou3 = findViewById(R.id.txt_thankyou3);
txt_thankyou1 = findViewById(R.id.txt_thankyou1);
txt_thankyou2 = findViewById(R.id.txt_thankyou2);
@ -234,22 +231,19 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
setTitle(R.string.action_about);
lv_contributors.setExpanded(true);
lv_developers.setExpanded(true);
lv_designers.setExpanded(true);
lv_ux.setExpanded(true);
accountSearchWebAdapterContributors = new AccountSearchDevAdapter(contributors);
lv_contributors.setAdapter(accountSearchWebAdapterContributors);
accountSearchWebAdapterDesigner = new AccountSearchDevAdapter(designers);
lv_designers.setAdapter(accountSearchWebAdapterDesigner);
accountSearchWebAdapterDeveloper = new AccountSearchDevAdapter(developers);
lv_developers.setAdapter(accountSearchWebAdapterDeveloper);
accountSearchWebAdapterUxUiDesigners = new AccountSearchDevAdapter(uxuidesigners);
lv_ux.setAdapter(accountSearchWebAdapterUxUiDesigners);
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "kasun", "toot.fedilab.app", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "fedilab", "framapiaf.org", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "mmarif", "mastodon.social", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "kasun", "mastodon.social", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "PhotonQyv", "mastodon.xyz", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "angrytux", "social.tchncs.de", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "guzzisti", "mastodon.social", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
@ -294,25 +288,33 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
Helper.openBrowser(AboutActivity.this, "https://social.tchncs.de/@angrytux");
}
});
name = new SpannableString("@kasun@stoot.fedilab.app");
name.setSpan(new UnderlineSpan(), 0, name.length(), 0);
txt_thankyou3.setText(name);
txt_thankyou3.setVisibility(View.VISIBLE);
txt_thankyou3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.openBrowser(AboutActivity.this, "https://toot.fedilab.app/@kasun");
}
});
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
return true;
default:
return super.onOptionsItemSelected(item);
if (item.getItemId() == android.R.id.home) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onRetrieveRemoteAccount(Results results) {
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
if (results == null) {
Toasty.error(getApplicationContext(), getString(R.string.toast_error), Toast.LENGTH_LONG).show();
return;
@ -327,10 +329,6 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
developers.add(account);
accountSearchWebAdapterDeveloper.notifyDataSetChanged();
break;
case "kasun":
designers.add(account);
accountSearchWebAdapterDesigner.notifyDataSetChanged();
break;
case "mmarif":
uxuidesigners.add(account);
accountSearchWebAdapterUxUiDesigners.notifyDataSetChanged();
@ -353,11 +351,6 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
new RetrieveRelationshipAsyncTask(getApplicationContext(), account.getId(), AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
}
if (designers != null) {
for (Account account : designers) {
new RetrieveRelationshipAsyncTask(getApplicationContext(), account.getId(), AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
}
if (contributors != null) {
for (Account account : contributors) {
new RetrieveRelationshipAsyncTask(getApplicationContext(), account.getId(), AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
@ -384,13 +377,6 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
break;
}
}
for (int i = 0; i < designers.size(); i++) {
if (designers.get(i).getId() != null && designers.get(i).getId().equals(relationship.getId())) {
designers.get(i).setFollowing(relationship.isFollowing() || userId.trim().equals(relationship.getId()));
accountSearchWebAdapterDesigner.notifyDataSetChanged();
break;
}
}
for (int i = 0; i < contributors.size(); i++) {
if (contributors.get(i).getId() != null && contributors.get(i).getId().equals(relationship.getId())) {
contributors.get(i).setFollowing(relationship.isFollowing() || userId.trim().equals(relationship.getId()));

View File

@ -1895,6 +1895,10 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
picker.show(getSupportFragmentManager(), "COUNTRY_PICKER");
return true;
case R.id.action_emoji:
if( emojis != null){
emojis.clear();
emojis = null;
}
emojis = new CustomEmojiDAO(getApplicationContext(), db).getAllEmojis(account.getInstance());
final AlertDialog.Builder builder = new AlertDialog.Builder(this, style);
int paddingPixel = 15;

View File

@ -86,7 +86,9 @@ public class UpdateAccountInfoByIDAsyncTask extends AsyncTask<Void, Void, Void>
if (response != null && response.getEmojis() != null && response.getEmojis().size() > 0) {
new CustomEmojiDAO(contextReference.get(), db).removeAll();
for (Emojis emojis : response.getEmojis()) {
new CustomEmojiDAO(contextReference.get(), db).insertEmoji(emojis);
if( emojis.isVisible_in_picker()) {
new CustomEmojiDAO(contextReference.get(), db).insertEmoji(emojis);
}
}
}
} catch (Exception ignored) {

View File

@ -4836,18 +4836,10 @@ public class API {
HttpsConnection httpsConnection = new HttpsConnection(context, this.instance);
String response = httpsConnection.get(getAbsoluteUrl("/custom_emojis"), 10, null, prefKeyOauthTokenT);
emojis = parseEmojis(new JSONArray(response));
apiResponse.setSince_id(httpsConnection.getSince_id());
apiResponse.setMax_id(httpsConnection.getMax_id());
} catch (HttpsConnection.HttpsConnectionException e) {
setError(e.getStatusCode(), e);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (KeyManagementException e) {
e.printStackTrace();
} catch (JSONException e) {
} catch (NoSuchAlgorithmException | IOException | KeyManagementException | JSONException e) {
e.printStackTrace();
}
//Add custom emoji for Pleroma

View File

@ -84,7 +84,7 @@ public class CustomEmojiAdapter extends BaseAdapter {
}
if (!emoji.isDrawableFound()) {
//if (!emoji.isDrawableFound()) {
emoji.setDrawableFound(true);
Glide.with(parent.getContext())
.asFile()
@ -116,7 +116,7 @@ public class CustomEmojiAdapter extends BaseAdapter {
imageView.setImageDrawable(emoji.getDrawable());
}
});
}
// }
return convertView;
}
}

View File

@ -20,7 +20,7 @@
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
@ -169,36 +169,6 @@
android:layout_marginRight="150dp"
android:textSize="16sp"
android:visibility="gone" />
<!-- About logo designer -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_marginTop="10dp"
android:padding="5dp"
android:text="@string/thanks_text_logo"
android:textColor="?colorAccent"
android:textSize="16sp" />
<app.fedilab.android.helper.ExpandableHeightListView
android:id="@+id/lv_designers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_marginLeft="150dp"
android:layout_marginRight="150dp"
android:divider="@null"
android:scrollbars="none" />
<TextView
android:id="@+id/txt_designers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_marginLeft="150dp"
android:layout_marginRight="150dp"
android:textSize="16sp"
android:visibility="gone" />
<!-- About contributors -->
<TextView
@ -221,6 +191,15 @@
android:layout_marginRight="150dp"
android:divider="@null"
android:scrollbars="none" />
<TextView
android:id="@+id/txt_thankyou3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_marginLeft="150dp"
android:layout_marginRight="150dp"
android:textSize="16sp"
android:visibility="gone" />
<TextView
android:id="@+id/txt_thankyou1"

View File

@ -145,31 +145,6 @@
android:visibility="gone" />
<!-- About logo designer -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="10dp"
android:gravity="center_vertical"
android:padding="5dp"
android:text="@string/thanks_text_logo"
android:textColor="?colorAccent"
android:textSize="16sp" />
<app.fedilab.android.helper.ExpandableHeightListView
android:id="@+id/lv_designers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@null"
android:scrollbars="none" />
<TextView
android:id="@+id/txt_designers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:visibility="gone" />
<!-- About contributors -->
<TextView
@ -190,6 +165,13 @@
android:divider="@null"
android:scrollbars="none" />
<TextView
android:id="@+id/txt_thankyou3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:visibility="gone" />
<TextView
android:id="@+id/txt_thankyou1"
android:layout_width="match_parent"

View File

@ -0,0 +1,12 @@
Added
- Customize themes
- Get information of instances from profiles
- Bookmarks can be imported/exported to the instance
Changed
- UI improvements
Fixed
- Crashes with conversations on Android 4
- Custom emoji picker
- Boosts can't be boosted due to their visibility