Skip to content

Commit

Permalink
feat: 0.9.0 (#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr authored Dec 15, 2024
2 parents e647cca + 2aed51d commit 9237db2
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 33 deletions.
2 changes: 1 addition & 1 deletion build-aux/dev.geopjr.Tuba.Clapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/libspelling.git",
"tag": "0.4.0"
"tag": "0.4.5"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion build-aux/dev.geopjr.Tuba.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/libspelling.git",
"tag": "0.4.0"
"tag": "0.4.5"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion data/dev.geopjr.Tuba.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<default>''</default>
</key>
<key name="contributors" type="as">
<default>['1021928818','2964685538','2486375860','3456423266','1352322503','445941323','3177176442','2386917030','987913018','1837154139','4173902237','4223975552','3163563143','3320460562','4233664772','136476033','4041964504','3998595277','580879396','4086778421']</default>
<default>['1021928818','2964685538','2486375860','3456423266','1352322503','445941323','3177176442','2813905310','2386917030','987913018','1837154139','4173902237','4223975552','3163563143','3320460562','4233664772','136476033','4041964504','3998595277','580879396']</default>
</key>
<key name="status-aria-verbosity" type="i">
<default>3</default>
Expand Down
52 changes: 52 additions & 0 deletions data/dev.geopjr.Tuba.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,58 @@
<control>touch</control>
</recommends>
<releases>
<release version="0.9.0" date="2024-12-15">
<description translate="no">
<ul>
<li>Visual refinements to match the state of the art of GNOME apps</li>
<li>Added accent color support</li>
<li>Added bold search query matches</li>
<li>Added Audio Visualizer</li>
<li>Added Focus Picker</li>
<li>Added Verified Authors</li>
<li>Added FediWrapped</li>
<li>Added Scheduled Posts</li>
<li>Added Draft Posts</li>
<li>Added poll animations</li>
<li>Added poll show results and refresh buttons</li>
<li>Added full emoji reaction support when possible</li>
<li>Added emoji reaction stats</li>
<li>Added viewing attachment at focus position</li>
<li>Added mute expiration and notification hiding</li>
<li>Added link discussion timelines</li>
<li>Added attachment preview on the alt text dialogs</li>
<li>Added Mastodon-like compose urls</li>
<li>Added the ability to mute your own posts</li>
<li>Added author auto-fill in the Advanced Search dialog</li>
<li>Added a separate bar for hashtags placed at the end of a post</li>
<li>Added opt-in anonymous preference popularity analytics</li>
<li>Added tuba supporter badge and decorations</li>
<li>Improved the profile posts, replies, media filter UX</li>
<li>Added moved accounts notice</li>
<li>Added syncing spellchecking and post language</li>
<li>Added avatar and header alt text viewing and editing on supported backends</li>
<li>Added account suggestions for new fediverse accounts</li>
<li>Added the ability to place lists on the sidebar</li>
<li>Added viewing which ones of the people you follow also follow an account</li>
<li>Added Bubble timeline on supported backends</li>
<li>Added dedicated quote button on supported backends</li>
<li>Added warning when copying a link to a non-publicly available post</li>
<li>Added moderator warning notifications</li>
<li>Removed window controls from the Media Viewer to avoid accidentally closing the whole app</li>
<li>GL is no longer the preferred renderer</li>
<li>Fixed alt text publishing on Akkoma</li>
<li>Fixed crashes related to the profile editor</li>
<li>Fixed the floating button area being unclickable and unscrollable</li>
<li>Fixed headerbar having a large minimum width</li>
<li>Fixed outdated profile info on cached users</li>
<li>Fixed list creation and editing on Akkoma</li>
<li>Fixed filter creation and editing on GoToSocial</li>
<li>Fixed jarring Media Viewer scale animation states</li>
<li>Other minor features, style changes, bug fixes, memory leak fixes and optimizations</li>
<li>Updated translations</li>
</ul>
</description>
</release>
<release version="0.8.4" date="2024-09-10">
<description translate="no">
<ul>
Expand Down
3 changes: 3 additions & 0 deletions data/ui/dialogs/schedule.ui
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
<property name="numeric">true</property>
<property name="wrap">true</property>
<property name="adjustment">hour_adjustment</property>
<signal name="value-changed" handler="validate" swapped="no" />
</object>
</child>
<child>
Expand All @@ -137,6 +138,7 @@
<property name="numeric">true</property>
<property name="wrap">true</property>
<property name="adjustment">minutes_adjustment</property>
<signal name="value-changed" handler="validate" swapped="no" />
</object>
</child>
<child>
Expand All @@ -157,6 +159,7 @@
<property name="numeric">true</property>
<property name="wrap">true</property>
<property name="adjustment">seconds_adjustment</property>
<signal name="value-changed" handler="validate" swapped="no" />
</object>
</child>
</object>
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'dev.geopjr.Tuba',
['c', 'vala'],
version: '0.8.4',
version: '0.9.0',
meson_version: '>= 0.56.0',
default_options: [
'warning_level=2',
Expand Down
55 changes: 31 additions & 24 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ namespace Tuba {
if (settings.proxy != "")
on_proxy_change ();
settings.notify ["proxy"].connect (on_proxy_notify);

if (settings.analytics) app.update_analytics.begin ();
app.update_contributors.begin ();
}

private void on_proxy_change (bool recover = false) {
Expand Down Expand Up @@ -382,9 +385,6 @@ namespace Tuba {
}

protected override void shutdown () {
if (settings.analytics) app.update_analytics ();
app.update_contributors ();

#if !DEV_MODE
settings.apply_all ();
#endif
Expand Down Expand Up @@ -757,7 +757,7 @@ namespace Tuba {
return generator.to_data (null);
}

public void update_contributors () {
public async void update_contributors () {
if (!settings.update_contributors) {
// if updating contributors from the API is not enabled
// but it has been enabled at some point in the past,
Expand Down Expand Up @@ -788,24 +788,27 @@ namespace Tuba {
}

if (!can_update) return;
new Request.GET ("https://api.tuba.geopjr.dev/v1/supporters")
.then ((in_stream) => {
var parser = Network.get_parser_from_inputstream (in_stream);
var msg = new Request.GET ("https://api.tuba.geopjr.dev/v1/supporters");

try {
yield msg.await ();
var parser = Network.get_parser_from_inputstream (msg.response_body);

string[] new_contributors = {};
Network.parse_array (parser, node => {
if (node != null) {
new_contributors += node.get_string ();
}
});
string[] new_contributors = {};
Network.parse_array (parser, node => {
if (node != null) {
new_contributors += node.get_string ();
}
});

settings.contributors = new_contributors;
settings.last_contributors_update = now_utc.format_iso8601 ();
})
.exec ();
settings.contributors = new_contributors;
settings.last_contributors_update = now_utc.format_iso8601 ();
} catch (Error e) {
warning (@"Couldn't update contributors: $(e.code) $(e.message)");
}
}

public void update_analytics () {
public async void update_analytics () {
if (!settings.analytics) return;

bool can_update = false;
Expand All @@ -823,12 +826,16 @@ namespace Tuba {
}

if (!can_update) return;
new Request.POST ("https://api.tuba.geopjr.dev/v1/analytics")
.body ("application/json", new Bytes.take (generate_analytics_object ().data))
.then ((in_stream) => {
settings.last_analytics_update = now_utc.format_iso8601 ();
})
.exec ();
var msg = new Request.POST ("https://api.tuba.geopjr.dev/v1/analytics")
.body ("application/json", new Bytes.take (generate_analytics_object ().data));

try {
yield msg.await ();
settings.last_analytics_update = now_utc.format_iso8601 ();
} catch (Error e) {
warning (@"Couldn't update analytics: $(e.code) $(e.message)");
}

}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Dialogs/Preferences.vala
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ public class Tuba.Dialogs.Preferences : Adw.PreferencesDialog {
settings.proxy = "";
}

if (settings.analytics) app.update_analytics ();
app.update_contributors ();
if (settings.analytics) app.update_analytics.begin ();
app.update_contributors.begin ();
}

protected class AnalyticsDialog : Adw.Dialog {
Expand Down
4 changes: 2 additions & 2 deletions src/Views/Search.vala
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ public class Tuba.Views.Search : Views.TabbedBase {

try {
search_query_regex = new Regex (
// "this is a test." => /(\bthis\b|\bis\b|\ba\b|\btest\.\b)/
@"(\\b$(GLib.Regex.escape_string (this.query).replace (" ", "\\b|\\b"))\\b)",
// "this is a test." => /(:?\bthis\b:?|:?\bis\b:?|:?\ba\b:?|:?\btest\.\b:?)/
@"(:?\\b$(GLib.Regex.escape_string (this.query).replace (" ", "\\b:?|:?\\b"))\\b:?)",
GLib.RegexCompileFlags.CASELESS | GLib.RegexCompileFlags.OPTIMIZE
);
} catch (RegexError e) {
Expand Down
1 change: 1 addition & 0 deletions src/Widgets/PreviewCardExplore.vala
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public class Tuba.Widgets.PreviewCardExplore : Gtk.ListBoxRow {

if (accounts.active.instance_info.tuba_mastodon_version >= 1) {
Gtk.Button discussions_button = new Gtk.Button () {
margin_top = 6,
child = used_times_label,
// translators: tooltip text on 'explore' tab button to
// see posts where the selected article is
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/Status.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@
} catch {}
}

if (hashtag_bar != null) content_box.remove (prev_card);
if (hashtag_bar != null) content_box.remove (hashtag_bar);
if (this.content.get_extracted_tags () != null && this.content.get_extracted_tags ().length > 0) {
hashtag_bar = new Widgets.HashtagBar (this.content.get_extracted_tags ());
content_box.append (hashtag_bar);
Expand Down

0 comments on commit 9237db2

Please sign in to comment.