We need to pull the data out as well! Let's add some initial decoders.
We still need tests to make sure it's working.
Signed-off-by: William Casarin <jb55@jb55.com>
This adds some initial code for nostrdb content parsing.
We still need to write tests for encoding and decoding, so this is
likely not working yet.
Signed-off-by: William Casarin <jb55@jb55.com>
We will be storing raw nostr bech32 buffers directly into nostrdb, so
adapt our bech32 code to reflect this.
When doing our content parsing pass, we will only look for strings and we
won't allocate any intermediate buffers. Only when we write this string
block to nostrdb will we actually allocate in our nostrdb output buffer
(no mallocs!)
Signed-off-by: William Casarin <jb55@jb55.com>
This is the start of our rust library for nostrdb. Implement idiomatic
interfaces for Ndb and NdbConfig.
Changelog-Added: Add initial rust library
Signed-off-by: William Casarin <jb55@jb55.com>
rust doesn't like packed structures, so hide this from bindgen
This also buttons up the API so less things are exposed which is good.
Signed-off-by: William Casarin <jb55@jb55.com>
- Fix aspect ratio, use fit
- Remove fixed height on image frame to align close button on image
- Use overlay instead of ZStack to reduce complexity
- Add background to close button to get better contrast in light mode
- Change close-image to be a button for better accessibility
Changelog-Fixed: Fix aspect ratio on pasted or uploaded images
Signed-off-by: Askeew <askeew@hotmail.com>
Closes: https://github.com/damus-io/damus/issues/2913
Huge refactor to add better structure to the project.
Separating features with their associated view and model structure.
This should be better organization and will allow us to improve the
overall architecture in the future.
I forsee many more improvements that can follow this change. e.g. MVVM Arch
As well as cleaning up duplicate, unused, functionality.
Many files have global functions that can also be moved or be renamed.
damus/
├── Features/
│ ├── <Feature>/
│ │ ├── Views/
│ │ └── Models/
├── Shared/
│ ├── Components/
│ ├── Media/
│ ├── Buttons/
│ ├── Extensions/
│ ├── Empty Views/
│ ├── ErrorHandling/
│ ├── Modifiers/
│ └── Utilities/
├── Core/
│ ├── Nostr/
│ ├── NIPs/
│ ├── DIPs/
│ ├── Types/
│ ├── Networking/
│ └── Storage/
Signed-off-by: ericholguin <ericholguin@apache.org>
Changelog-Fixed: Fixed note content rendering to not remove whitespace before hashtag
Closes: https://github.com/damus-io/damus/issues/3122
Fixes: f436291209 ("Fix note content rendering to not remove whitespace before hashtag")
Signed-off-by: Terry Yiu <git@tyiu.xyz>
Put the views into ScrollView
Fixed banner offset in Geometry reader
Changelog-Fixed: Fixed stretchy banner header in Edit profile
Signed-off-by: Swift Coder <scoder1747@gmail.com>