Skip to content

Commit

Permalink
feat: add notice when drag more than 1 file to EnterView
Browse files Browse the repository at this point in the history
Signed-off-by: Next Alone <[email protected]>
  • Loading branch information
omg-xtao authored Sep 30, 2024
1 parent ce1fafe commit 2fcee4e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.Keep;
import androidx.annotation.NonNull;
Expand Down Expand Up @@ -5375,6 +5376,9 @@ public boolean onDragEvent(DragEvent event) {
if (clipData.getItemCount() == 1 && (clipData.getDescription().hasMimeType("image/*") || clipData.getDescription().hasMimeType("video/mp4")) && !isEditingBusinessLink()) {
editPhoto(clipData.getItemAt(0).getUri(), clipData.getDescription().getMimeType(0));
return true;
} else if (clipData.getItemCount() > 1) {
Toast.makeText(getContext(), "Don't drag more than 1 file at a time", Toast.LENGTH_SHORT).show();
return true;
}
}
}
Expand Down

0 comments on commit 2fcee4e

Please sign in to comment.