Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 1c83a3d9 authored by alperozturk's avatar alperozturk
Browse files

add NoteShareDetailActivity

parent 2d00a241
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -51,6 +51,9 @@
        <activity
            android:name=".share.NoteShareActivity" />

        <activity
            android:name=".share.NoteShareDetailActivity" />

        <activity
            android:name=".importaccount.ImportAccountActivity"
            android:label="@string/add_account" />
+17 −1
Original line number Diff line number Diff line
@@ -180,6 +180,8 @@ public class NoteShareActivity extends BrandedActivity implements ShareeListAdap
                        }

                        runOnUiThread(() -> suggestionAdapter.changeCursor(cursor));
                    } catch (Exception e) {
                        Log_OC.d(TAG,"Exception setupSearchView.onQueryTextChange: " + e);
                    }
                }}).start();
                return false;
@@ -199,7 +201,9 @@ public class NoteShareActivity extends BrandedActivity implements ShareeListAdap
                    String suggestion = cursor.getString(cursor.getColumnIndexOrThrow(SearchManager.SUGGEST_COLUMN_TEXT_1));
                    binding.searchView.setQuery(suggestion, false);

                    // TODO: Navigate to details
                    String shareWith = cursor.getString(cursor.getColumnIndexOrThrow(UsersAndGroupsSearchProvider.SHARE_WITH));
                    int shareType = cursor.getInt(cursor.getColumnIndexOrThrow(UsersAndGroupsSearchProvider.SHARE_TYPE));
                    navigateNoteShareDetail(shareWith, shareType);
                }
                return true;
            }
@@ -209,6 +213,18 @@ public class NoteShareActivity extends BrandedActivity implements ShareeListAdap
        binding.searchView.setInputType(InputType.TYPE_NULL);
    }

    private void navigateNoteShareDetail(String shareWith, int shareType) {
        Bundle bundle = new Bundle();

        bundle.putSerializable(NoteShareDetailActivity.ARG_NOTE, note);
        bundle.putString(NoteShareDetailActivity.ARG_SHAREE_NAME, shareWith);
        bundle.putInt(NoteShareDetailActivity.ARG_SHARE_TYPE, shareType);

        Intent intent = new Intent(this, NoteShareDetailActivity.class);
        intent.putExtras(bundle);
        startActivity(intent);
    }

    private void disableSearchView(View view) {
        view.setEnabled(false);

+560 −0

File added.

Preview size limit exceeded, changes collapsed.

+167 −0

File added.

Preview size limit exceeded, changes collapsed.

+9 −2

File changed.

Preview size limit exceeded, changes collapsed.

Loading