mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-11 16:26:22 +00:00
update Sentry, update oshi, update android-all, npe prevention
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
<dependency>
|
||||
<groupId>io.sentry</groupId>
|
||||
<artifactId>sentry-logback</artifactId>
|
||||
<version>8.19.1</version>
|
||||
<version>8.21.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jgrapht</groupId>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<groupId>org.robolectric</groupId>
|
||||
<artifactId>android-all</artifactId>
|
||||
<!-- update version: 16-robolectric-13921718 but needs to fix Android 16 Edge to edge enforcement -->
|
||||
<version>15-robolectric-12650502</version>
|
||||
<version>15-robolectric-13954326</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -156,7 +156,7 @@
|
||||
<dependency>
|
||||
<groupId>io.sentry</groupId>
|
||||
<artifactId>sentry-android</artifactId>
|
||||
<version>8.19.1</version>
|
||||
<version>8.21.1</version>
|
||||
<type>aar</type>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@@ -177,7 +177,7 @@
|
||||
<dependency>
|
||||
<groupId>io.sentry</groupId>
|
||||
<artifactId>sentry-android-core</artifactId>
|
||||
<version>8.19.1</version>
|
||||
<version>8.21.1</version>
|
||||
<type>aar</type>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@@ -201,7 +201,7 @@
|
||||
<dependency>
|
||||
<groupId>io.sentry</groupId>
|
||||
<artifactId>sentry-android-ndk</artifactId>
|
||||
<version>8.19.1</version>
|
||||
<version>8.21.1</version>
|
||||
<type>aar</type>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
<version>6.8.3</version>
|
||||
<version>6.9.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -92,7 +92,12 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
||||
|
||||
private T get(int index) {
|
||||
synchronized (lock) {
|
||||
try {
|
||||
// TODO: Find cause why index is invalid on some cases...
|
||||
return internalList.get(index);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -579,6 +584,8 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
||||
maxPileHeight = 0;
|
||||
for (int j = 0; j < group.piles.size(); j++) {
|
||||
Pile pile = group.piles.get(j);
|
||||
if (pile == null)
|
||||
continue;
|
||||
y = pileY;
|
||||
for (int k = 0; k < pile.items.size(); k++) {
|
||||
ItemInfo itemInfo = pile.items.get(k);
|
||||
@@ -588,7 +595,10 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
||||
itemInfo.setBounds(x, y, itemWidth, itemHeight);
|
||||
y += dy;
|
||||
}
|
||||
pile.items.get(pile.items.size() - 1).pos = CardStackPosition.Top;
|
||||
ItemInfo itemInfo = pile.items.get(pile.items.size() - 1);
|
||||
if (itemInfo == null)
|
||||
continue;
|
||||
itemInfo.pos = CardStackPosition.Top;
|
||||
pileHeight = y + itemHeight - dy - pileY;
|
||||
if (pileHeight > maxPileHeight) {
|
||||
maxPileHeight = pileHeight;
|
||||
@@ -705,9 +715,13 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
||||
float relX = x + group.getScrollLeft() - group.getLeft();
|
||||
float relY = y + getScrollValue();
|
||||
Pile pile = group.piles.get(j);
|
||||
if (pile == null)
|
||||
continue;
|
||||
if (pile.contains(relX, relY)) {
|
||||
for (int k = pile.items.size() - 1; k >= 0; k--) {
|
||||
ItemInfo item = pile.items.get(k);
|
||||
if (item == null)
|
||||
continue;
|
||||
if (item.contains(relX, relY)) {
|
||||
return item;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user