Commit 833ea5d0 authored by Thomas's avatar Thomas
Browse files

Fix 103 response code for OG

parent 04c5f32c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -793,6 +793,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                                    Request request = new Request.Builder()
                                            .url(potentialUrl)
                                            .build();
                                    String finalPotentialUrl = potentialUrl;
                                    client.newCall(request).enqueue(new Callback() {
                                        @Override
                                        public void onFailure(@NonNull Call call, @NonNull IOException e) {
@@ -869,6 +870,12 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                                                } catch (Exception e) {
                                                    e.printStackTrace();
                                                }
                                            } else if (response.code() == 103) {
                                                activity.runOnUiThread(() -> {
                                                    Bundle b = new Bundle();
                                                    b.putString(Helper.ARG_SHARE_DESCRIPTION, finalPotentialUrl);
                                                    CrossActionHelper.doCrossShare(activity, b);
                                                });
                                            } else {
                                                activity.runOnUiThread(() -> Toasty.warning(activity, activity.getString(R.string.toast_error), Toast.LENGTH_LONG).show());
                                            }
+4 −4
Original line number Diff line number Diff line
@@ -959,14 +959,14 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
        }
        if (description != null && description.trim().length() > 0) {
            if (url != null && !description.contains(url)) {
                statusList.get(position).text += url + "\n";
                statusList.get(position).text += url + "\n>";
            }
            statusList.get(position).text += ">" + description + "\n\n";
            statusList.get(position).text += description + "\n\n";
        } else if (content != null && content.trim().length() > 0) {
            if (!content.contains(url)) {
                statusList.get(position).text += url + "\n";
                statusList.get(position).text += url + "\n>";
            }
            statusList.get(position).text += ">" + content + "\n\n";
            statusList.get(position).text += content + "\n\n";
        } else {
            statusList.get(position).text += url + "\n\n";
        }