]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- allow to set visibility to auto 939/head
authorArvin Schnell <aschnell@suse.de>
Tue, 1 Oct 2024 14:04:39 +0000 (16:04 +0200)
committerArvin Schnell <aschnell@suse.de>
Tue, 1 Oct 2024 14:04:39 +0000 (16:04 +0200)
client/utils/TableFormatter.cc
client/utils/TableFormatter.h

index d7c69ea7c960a30904267a43c74bd4ff7d25e967..e4af586f61b8a20f332dabf19ef60abb84072667 100644 (file)
@@ -44,6 +44,10 @@ namespace snapper
            if (table.has_id(id))
                table.set_trim(id, true);
 
+       for (Id id : table_formatter._auto_visibility)
+           if (table.has_id(id))
+               table.set_visibility(id, Visibility::AUTO);
+
        for (const vector<string>& row : table_formatter._rows)
        {
            Table::Row table_row(table);
index 3cbada30762d043f5b5555dc137ec51e620e2c69..7d7a181cfd1673123c39bbd0bdb5dc757a71cd01 100644 (file)
@@ -52,6 +52,7 @@ namespace snapper
        vector<Cell>& header() { return _header; }
        vector<Id>& abbreviate() { return _abbreviate; }
        vector<Id>& trim() { return _trim; }
+       vector<Id>& auto_visibility() { return _auto_visibility; }
        vector<vector<string>>& rows() { return _rows; }
 
        friend ostream& operator<<(ostream& stream, const TableFormatter& table_formatter);
@@ -63,6 +64,7 @@ namespace snapper
        vector<Cell> _header;
        vector<Id> _abbreviate;
        vector<Id> _trim;
+       vector<Id> _auto_visibility;
        vector<vector<string>> _rows;
 
     };