Skip to content

Commit

Permalink
Fix #352
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Oct 12, 2024
1 parent d9da86a commit f0495ed
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
14 changes: 14 additions & 0 deletions shared/liboxide/devicesettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,18 @@ namespace Oxide {
}
return physicalKeyboards;
}

const QString& DeviceSettings::version(){
static QString version = "";
if(version.isEmpty()){
auto lines = QFile("/usr/share/remarkable/update.conf").readAll().split('\n');
for(const QString& line : lines){
if(line.startsWith("REMARKABLE_RELEASE_VERSION=")){
version = line.mid(27);
break;
}
}
}
return version;
}
}
5 changes: 5 additions & 0 deletions shared/liboxide/devicesettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ namespace Oxide{
* \return All virtual keyboard devices
*/
QList<event_device> virtualKeyboards();
/*!
* \brief Get the version of the OS
* \return Version string
*/
const QString& version();

private:
DeviceType _deviceType;
Expand Down
2 changes: 1 addition & 1 deletion shared/liboxide/oxide_sentry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ namespace Oxide::Sentry{
sentry_value_set_by_key(user, "id", sentry_value_new_string(machineId()));
sentry_set_user(user);
// Setup context
std::string version = readFile("/etc/version");
auto version = deviceSettings.version().toStdString();
sentry_set_tag("os.version", version.c_str());
sentry_set_tag("name", name);
sentry_value_t device = sentry_value_new_object();
Expand Down

0 comments on commit f0495ed

Please sign in to comment.