Skip to content

Commit

Permalink
run spotlessApply
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedRejeb committed Oct 13, 2024
1 parent d4d6ed9 commit fe19853
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2023, Mohamed Ben Rejeb and the Compose Dnd project contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mohamedrejeb.compose.dnd

import androidx.compose.runtime.staticCompositionLocalOf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,17 @@ private data class DropTargetNode<T>(
override fun onAttach() {
isShadow = currentValueOf(LocalDragAndDropInfo).isShadow

if (isShadow)
if (isShadow) {
return
}

state.addDropTarget(dropTargetState)
}

override fun onPlaced(coordinates: LayoutCoordinates) {
if (isShadow)
if (isShadow) {
return
}

state.addDropTarget(dropTargetState)

Expand All @@ -166,22 +168,25 @@ private data class DropTargetNode<T>(
}

override fun onRemeasured(size: IntSize) {
if (isShadow)
if (isShadow) {
return
}

dropTargetState.size = size.toSize()
}

override fun onReset() {
if (isShadow)
if (isShadow) {
return
}

state.removeDropTarget(key)
}

override fun onDetach() {
if (isShadow)
if (isShadow) {
return
}

state.removeDropTarget(key)
}
Expand Down

0 comments on commit fe19853

Please sign in to comment.