sailfishos-applications / filecase

File manager for SailfishOS
Other
8 stars 4 forks source link

Adapt to SailfishOS' new (by v4.2.0) sharing API #83

Open Olf0 opened 4 months ago

Olf0 commented 4 months ago

SailfishOS 4.2.0 uses a new sharing API and omits the old one, hence currently "sharing" with FileCase is defunct on SailfishOS ≥ 4.2.0.

This code change in Storeman can be used as a template: https://github.com/storeman-developers/harbour-storeman/commit/7196fc2f1e53d47f40a8e0514548e8d9144afc5e

Edit: An even better template seems to be https://github.com/monich/sailfish-qrshare/commit/102c5b4224e7e65b63d1e613e6f31ce49e4e4b16

But in contrast to Storeman a single codebase should be retained, hence the two code paths for sailfish-version < 4.2.0 and sailfish-version ≥ 4.2.0 ought to be e.g. conditionally compiled by preprocessor statements (see e.g. this construct in the SailfishOS:Chum GUI app as a starting point) etc.

P.S.: This is also one part of issue #84 (i.e. splitting PR #60 and adding backward-compatibility to each of its parts).