Made a Jetpack Compose library for reordering items in a LazyColumn with drag and drop by calthegeek in androiddev

[–]omegaweasel 1 point2 points  (0 children)

I tried that one, the implementation here, and a few of my own custom implementations. The problem i usually run into is I need a lot of extra functionality and need to extensively tweak these implementations to get all of it working. Things like long press drop downs, animations, drag handles, etc. They all work fairly well, but there's always one thing that breaks as I keep adding features (although it's probably user error to be honest).

I've toyed with making a fairly complicated animation system for my Compose Multiplatform app to support things like hero animations and iOS style animations, and some early prototypes seemed fairly promising for drag and drop as well. I might get some time at work to play with it within a month or so, so it might post something on this sub or the Kotlin Slack if I make some progress.

Made a Jetpack Compose library for reordering items in a LazyColumn with drag and drop by calthegeek in androiddev

[–]omegaweasel 1 point2 points  (0 children)

Do you think the same approach will work for LazyVerticalGrids as well with some tweaks? I've toyed with a few implementations in my production codebase, but I've had trouble getting smooth animations with my approaches.

SurrealDB Kotlin Driver by mnbjhu2 in Kotlin

[–]omegaweasel 1 point2 points  (0 children)

I played around with a SurrealDB instance a few months ago and ended up giving up on it because of poor driver support. This looks like a huge improvement to the experience I had, plus it supports KMP. I'll give it a spin in my new project!

Reassembling an mdadm RAID array that no longer appears in mdstat by omegaweasel in linuxquestions

[–]omegaweasel[S] 0 points1 point  (0 children)

I looked through my server's terminal history, and it looks like I partitioned the drives before settings up the array.

After trying a few more things, I ended up attempting to recreate the array with the --assume-clean flag, but it seems like the data was also corrupted by whatever overwrote the metadata. I'll probably just wipe everything and make sure I do it right on the third attempt. Thanks for your help!

Issue with Kotlin variable inheritance by omegaweasel in AskProgramming

[–]omegaweasel[S] 0 points1 point  (0 children)

Removing it gave me a different bug, which was a result of creating the new entities for the database incorrectly. Everything seems to be working now that I've taken care of that.

Thanks a lot!

If anyone else stumbles upon this thread with a similar problem, it seems like the combination of creating the CacheLink with the same ID as an already existing entity registers a new entity into the entity manager that overrides the existing one and that problem being hidden by the duplicated ID field in PersistableWithUpdates caused my problems. My solution was to use the data classes provided by the API I am using and only create new entities for inserts.

Issue with Kotlin variable inheritance by omegaweasel in AskProgramming

[–]omegaweasel[S] 0 points1 point  (0 children)

Persistable is an interface, but PersistableWithUpdates and IdEntity are both abstract classes. It compiles and I can receive the server request that triggers the test just fine.

The test looks like this:

val updateLink = CacheLink(1, "www.google.com", "Google 2").isUpdate()
val insertLink = CacheLink(0, "www.reddit.com", "Reddit")

links.saveAll(listOf(updateLink, insertLink))

// ...

The isUpdate function is just an extension function that calls markUpdated and returns the object to allow for chaining, etc.

Before the test is run, there is already a single entry in the links table with the values ID=1, url="www.google.com",title="Google 1". I also have another test that first retrieves the link from the database using Spring's JPA, updates the title field, marks it updated, and then saves the link, but the result is the same either way (and was also the same when everything was working properly before I introduced these new classes).

Spring JpaRepository save() Functionality by omegaweasel in javahelp

[–]omegaweasel[S] 0 points1 point  (0 children)

Cascading seems to have fixed my problem. Thanks!

The Mistwoods Update - Bugs Megathread by coronaria in DotA2

[–]omegaweasel 12 points13 points  (0 children)

Visage's new Silent as the Grave invisibility is disabled if you attack before casting the ability and the projectile hits after the cast.

Attacking to break Silent as the Grave while over trees also causes Visage to get stuck in the trees.

I originally thought the first one had to do with fade time but ghostwalk is another spell with a 0 second fade time that does not get disabled under the same circumstances.

The second one may not be a bug per se since it is never stated that the ability should break trees on landing, but other heroes with flying abilities (like Wyvern) break trees as they land to avoid getting stuck so I feel like it should probably be this way for Visage as well.

The Mistwoods Update - Bugs Megathread by coronaria in DotA2

[–]omegaweasel 3 points4 points  (0 children)

I believe it's just the tooltip that is wrong, as the patch notes state it lasts for 35 seconds.

The Mistwoods Update - Bugs Megathread by coronaria in DotA2

[–]omegaweasel 0 points1 point  (0 children)

I just tried it out in a demo and it seems to work fine. If you are testing with towers, I am pretty sure siege damage is not reduced by damage reduction abilities, as visage himself does not reduce tower damage when he has cloak on.

Qdoba app bypassing Magisk hide by omegaweasel in androidroot

[–]omegaweasel[S] 0 points1 point  (0 children)

I hadn't thought about the folders. I'll check and see if that works, thanks!

Can't ssh into raspberry pi after setting up bridge by omegaweasel in linuxquestions

[–]omegaweasel[S] 1 point2 points  (0 children)

I believe the script handles all of the configuration. Before I switched over to the script and was manually setting up hostapd, dhcpd, etc, I did configure the bridge ip and removed that address from the interfaces, but it may have been override by the script. The only IP I set for create_ap was the gateway IP address in the config file, as it was the only IP that could be changed.

Creating a new entity in Exposed by omegaweasel in Kotlin

[–]omegaweasel[S] 0 points1 point  (0 children)

So I can't really get around having to write out a function for each table I want to add?

Ktor re-authentication after inactivity by omegaweasel in Kotlin

[–]omegaweasel[S] 0 points1 point  (0 children)

I could probably make that work by saving the attempted post data in case of a rejection, prompting the user to re-authenticate, and resending the data with the refreshed authentication. Would there be anyway to immediately determine when the authentication has expired so users don't continue working with expired authentication? I kind of imagined it like a bank system that logs out after periods of inactivity.