mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-24 13:23:50 -04:00
chore(ios): minor code cleanup
Signed-off-by: rooot <hey@rooot.gay>
This commit is contained in:
parent
3938ad4727
commit
e4aa9a556a
2 changed files with 6 additions and 10 deletions
loader/src
|
@ -1,7 +1,6 @@
|
|||
#include "crashlog.hpp"
|
||||
#include <fmt/core.h>
|
||||
#include "about.hpp"
|
||||
#include "../loader/ModImpl.hpp"
|
||||
#include <Geode/Utils.hpp>
|
||||
|
||||
using namespace geode::prelude;
|
||||
|
@ -43,11 +42,11 @@ void crashlog::printMods(std::stringstream& stream) {
|
|||
using namespace std::string_view_literals;
|
||||
for (auto& mod : mods) {
|
||||
stream << fmt::format("{} | [{}] {}\n",
|
||||
mod->isCurrentlyLoading() ? "o"sv :
|
||||
mod->isEnabled() ? "x"sv :
|
||||
mod->isCurrentlyLoading() ? "o"sv :
|
||||
mod->isEnabled() ? "x"sv :
|
||||
mod->hasLoadProblems() ? "!"sv : // thank you for this bug report
|
||||
mod->targetsOutdatedVersion() ? "*"sv : // thank you very much for this bug report
|
||||
mod->shouldLoad() ? "~"sv :
|
||||
mod->shouldLoad() ? "~"sv :
|
||||
" "sv,
|
||||
mod->getVersion().toVString(), mod->getID()
|
||||
);
|
||||
|
@ -66,7 +65,7 @@ std::string crashlog::writeCrashlog(geode::Mod* faultyMod, std::string const& in
|
|||
// add a file to let Geode know on next launch that it crashed previously
|
||||
// this could also be done by saving a loader setting or smth but eh.
|
||||
(void)utils::file::writeBinary(crashlog::getCrashLogDirectory() / "last-crashed", {});
|
||||
|
||||
|
||||
std::stringstream file;
|
||||
|
||||
file << getDateString(false) << "\n"
|
||||
|
|
|
@ -32,7 +32,7 @@ std::string utils::clipboard::read() {
|
|||
|
||||
void utils::web::openLinkInBrowser(std::string const& url) {
|
||||
[[UIApplication sharedApplication]
|
||||
openURL:[NSURL URLWithString:[NSString stringWithUTF8String:url.c_str()]]];
|
||||
openURL:[NSURL URLWithString:[NSString stringWithUTF8String:url.c_str()]] options:{} completionHandler:nil];
|
||||
}
|
||||
|
||||
#pragma region Folder Pick Delegate
|
||||
|
@ -81,10 +81,7 @@ UIViewController* getCurrentViewController() {
|
|||
}
|
||||
|
||||
bool utils::file::openFolder(std::filesystem::path const& path) {
|
||||
std::string newPath = fmt::format("shareddocuments://{}", path);
|
||||
if (getenv("GEODEINJECT_LOADED")) {
|
||||
newPath = fmt::format("filza://{}", path);
|
||||
}
|
||||
std::string newPath = fmt::format("{}://{}", getenv("GEODEINJECT_LOADED") ? "filza" : "shareddocuments", path);
|
||||
NSURL *url = [NSURL URLWithString:[NSString stringWithUTF8String:newPath.c_str()]];
|
||||
if ([[UIApplication sharedApplication] canOpenURL:url]) {
|
||||
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue