1
0
mirror of https://github.com/hyperspacedev/hyperspace synced 2025-01-31 09:37:05 +01:00

Search for hashtags with # works

Signed-off-by: Marquis Kurt <software@marquiskurt.net>
This commit is contained in:
Marquis Kurt 2019-10-27 15:34:55 -04:00
parent 41145837ad
commit 56ebbeffae
No known key found for this signature in database
GPG Key ID: 725636D259F5402D

View File

@ -28,6 +28,7 @@ import {
ListItem,
Tooltip
} from "@material-ui/core";
import MenuIcon from "@material-ui/icons/Menu";
import SearchIcon from "@material-ui/icons/Search";
import NotificationsIcon from "@material-ui/icons/Notifications";
@ -41,6 +42,7 @@ import InfoIcon from "@material-ui/icons/Info";
import CreateIcon from "@material-ui/icons/Create";
import SupervisedUserCircleIcon from "@material-ui/icons/SupervisedUserCircle";
import ExitToAppIcon from "@material-ui/icons/ExitToApp";
import { styles } from "./AppLayout.styles";
import { MultiAccount, UAccount } from "../../types/Account";
import {
@ -232,6 +234,8 @@ export class AppLayout extends Component<any, IAppLayoutState> {
}
searchForQuery(what: string) {
what = what.replace(/^#/g, "tag:");
console.log(what);
window.location.href = isDesktopApp()
? "hyperspace://hyperspace/app/index.html#/search?query=" + what
: "/#/search?query=" + what;