diff options
author | Stefan Niedermann <info@niedermann.it> | 2022-01-10 12:04:11 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2022-01-10 12:04:11 +0300 |
commit | 804c5ce3b0b7a139508057a0b9c219bb4533aa6c (patch) | |
tree | 7e6d03f78a376df353401bf9bcaebc010e6e2c05 | |
parent | c6b7d4fe9d5765e23a3ad1ce94589d52ee5578d7 (diff) |
Update changelog
Signed-off-by: Stefan Niedermann <info@niedermann.it>
5 files changed, 20 insertions, 18 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java index 75a8d4492..ba58104c5 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java @@ -58,7 +58,6 @@ import androidx.core.content.ContextCompat; import androidx.core.graphics.drawable.DrawableCompat; import androidx.core.view.GravityCompat; import androidx.core.view.ViewCompat; -import androidx.fragment.app.Fragment; import androidx.lifecycle.LiveData; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProvider; @@ -96,7 +95,6 @@ import it.niedermann.nextcloud.deck.exceptions.OfflineException; import it.niedermann.nextcloud.deck.model.Account; import it.niedermann.nextcloud.deck.model.Board; import it.niedermann.nextcloud.deck.model.Stack; -import it.niedermann.nextcloud.deck.model.Card; import it.niedermann.nextcloud.deck.model.full.FullBoard; import it.niedermann.nextcloud.deck.model.full.FullCard; import it.niedermann.nextcloud.deck.model.full.FullStack; @@ -113,8 +111,8 @@ import it.niedermann.nextcloud.deck.ui.board.EditBoardDialogFragment; import it.niedermann.nextcloud.deck.ui.board.EditBoardListener; import it.niedermann.nextcloud.deck.ui.branding.BrandedSnackbar; import it.niedermann.nextcloud.deck.ui.card.CardAdapter; -import it.niedermann.nextcloud.deck.ui.card.NewCardDialog; import it.niedermann.nextcloud.deck.ui.card.CreateCardListener; +import it.niedermann.nextcloud.deck.ui.card.NewCardDialog; import it.niedermann.nextcloud.deck.ui.exception.ExceptionDialogFragment; import it.niedermann.nextcloud.deck.ui.exception.ExceptionHandler; import it.niedermann.nextcloud.deck.ui.filter.FilterDialogFragment; @@ -1020,9 +1018,9 @@ public class MainActivity extends AppCompatActivity implements DeleteStackListen * @param stackId ID of the stack to find * @return Instance of StackFragment */ + @Nullable public StackFragment findStackFragmentById(long stackId) { - StackFragment fragment = (StackFragment) getSupportFragmentManager().findFragmentByTag("f" + stackId); - return fragment; + return (StackFragment) getSupportFragmentManager().findFragmentByTag("f" + stackId); } /** @@ -1031,11 +1029,11 @@ public class MainActivity extends AppCompatActivity implements DeleteStackListen */ @Override public void onCardCreated(FullCard createdCard) { - Card card = createdCard.getCard(); + final var card = createdCard.getCard(); DeckLog.log("Card Created! Title:" + card.getTitle() + " in stack ID: " + card.getStackId()); // Scroll the given StackFragment to the bottom, so the new Card is in view. - StackFragment fragment = findStackFragmentById(card.getStackId()); + final var fragment = findStackFragmentById(card.getStackId()); if (fragment != null) { fragment.scrollToBottom(); } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/AttachmentImageView.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/AttachmentImageView.java index 039f92dae..38c6209f3 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/AttachmentImageView.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/AttachmentImageView.java @@ -1,5 +1,6 @@ package it.niedermann.nextcloud.deck.ui.card.attachments; +import android.annotation.SuppressLint; import android.content.Context; import android.util.AttributeSet; import android.view.GestureDetector; @@ -10,11 +11,9 @@ import androidx.annotation.Nullable; import com.otaliastudios.zoom.ZoomImageView; -import it.niedermann.nextcloud.deck.DeckLog; - public class AttachmentImageView extends ZoomImageView { public AttachmentImageZoomListener zoomListener; - GestureDetector gestureDetector; + private GestureDetector gestureDetector; @Override protected void onAttachedToWindow() { @@ -33,6 +32,7 @@ public class AttachmentImageView extends ZoomImageView { super(context, attrs); } + @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouchEvent(@NonNull MotionEvent ev) { int pointerCount = ev.getPointerCount(); diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/sharetarget/ShareTargetActivity.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/sharetarget/ShareTargetActivity.java index 7bbb15a35..a9e5a4f9a 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/sharetarget/ShareTargetActivity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/sharetarget/ShareTargetActivity.java @@ -9,7 +9,6 @@ import android.net.Uri; import android.os.Bundle; import android.os.Parcelable; import android.view.Menu; -import android.view.View; import android.widget.Toast; import androidx.annotation.NonNull; @@ -194,14 +193,9 @@ public class ShareTargetActivity extends MainActivity implements SelectCardListe protected void setCurrentBoard(@NonNull Board board) { super.setCurrentBoard(board); binding.toolbar.setTitle(R.string.simple_select); - - // Show Edit buttons so we can add new lists/cards showEditButtonsIfPermissionsGranted(); } - // @Override - // protected void showFabIfEditPermissionGranted() { /* Silence is gold */ } - @Override public boolean onCreateOptionsMenu(Menu menu) { return true; diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackFragment.java index ca9f0f614..0c32f0f3a 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackFragment.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackFragment.java @@ -2,7 +2,6 @@ package it.niedermann.nextcloud.deck.ui.stack; import android.content.Context; import android.os.Bundle; -import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -182,7 +181,15 @@ public class StackFragment extends Fragment implements DragAndDropTab<CardAdapte */ public void scrollToBottom() { activity.runOnUiThread(() -> { - LinearLayoutManager layoutManager = (LinearLayoutManager) binding.recyclerView.getLayoutManager(); + if (adapter == null) { + DeckLog.warn("Adapter is null"); + return; + } + final var layoutManager = (LinearLayoutManager) binding.recyclerView.getLayoutManager(); + if (layoutManager == null) { + DeckLog.warn("LayoutManager is null"); + return; + } int currentItem = layoutManager.findFirstVisibleItemPosition(); if (adapter.getItemCount() - currentItem < 40) { diff --git a/fastlane/metadata/android/en-US/changelogs/1020000.txt b/fastlane/metadata/android/en-US/changelogs/1020000.txt new file mode 100644 index 000000000..b20aa6d48 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/1020000.txt @@ -0,0 +1,3 @@ +- 🖼 Zoom attachments by @NeilSeligmann +- ✨ Automatically scroll to new created card by @NeilSeligmann +- ➕ Enable card and list creation from attachment share activity by @NeilSeligmann
\ No newline at end of file |