Skip to content

Commit

Permalink
Add screenshot to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
geom3trik committed Dec 17, 2024
1 parent 397b8f8 commit 9c54169
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ edition = "2021"
[dependencies]
vizia = {git = "https://github.com/vizia/vizia"}
# vizia = {path = "../vizia"}
# vizia = "0.2"
rusqlite = { version = "0.32", features = ["bundled", "chrono"] }
chrono = { version = "0.4.26", features = ["serde"]}
serde = { version = "1.0.177", features = ["derive"] }
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Vizia Sample Browser

An audio sample browser application.

| Header 1 | Header 2 |
| --- | --- |
| Table 1 | Table 2 |
![](screenshot.png)
Binary file added screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion src/data/tags_data.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! GUI state for the tags panel
use fuzzy_matcher::{skim::SkimMatcherV2, FuzzyMatcher};
use vizia::prelude::*;

use crate::Tag;
Expand All @@ -24,7 +25,17 @@ impl Model for TagsData {
fn event(&mut self, cx: &mut EventContext, event: &mut Event) {
event.map(|tags_event, meta| match tags_event {
TagsEvent::Search(search_text) => {
//
let mut matcher = SkimMatcherV2::default();

if !self.search_case_sensitive {
matcher = matcher.ignore_case()
} else {
matcher = matcher.respect_case()
}

for tag in self.tags.iter() {
if let Some((_, indices)) = matcher.fuzzy_indices(&tag.name, search_text) {}
}
}

_ => {}
Expand Down

0 comments on commit 9c54169

Please sign in to comment.