Skip to content

Commit

Permalink
use query for title
Browse files Browse the repository at this point in the history
  • Loading branch information
brindy committed Mar 11, 2024
1 parent 58d5cdb commit e38c844
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Core/HistoryCapture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ public class HistoryCapture {
guard let url = url?.urlOrDuckDuckGoCleanQuery, let title, !title.isEmpty else {
return
}
coordinator.updateTitleIfNeeded(title: title, url: url)

if url.isDuckDuckGoSearch, let query = url.searchQuery {
coordinator.updateTitleIfNeeded(title: query, url: url)
} else {
coordinator.updateTitleIfNeeded(title: title, url: url)
}

coordinator.commitChanges(url: url)
}

Expand Down

0 comments on commit e38c844

Please sign in to comment.