nordprojects / littleprinters-ios-app

A friendly new messaging app for Little Printer
https://nordprojects.co/projects/littleprinters
Apache License 2.0
27 stars 1 forks source link

Sharing with Little Printers results in multiple printing #15

Open shenzo1 opened 4 years ago

shenzo1 commented 4 years ago

Hi,

First, thanks for all you guys did at Nord projects to revive this beloved little printer. I recently acquired one, and though it seems that a lot of the functions of the by gone Berg era are no longer there, it is still a very useful IoT device to me.

I am encountering a bug when sharing text from an external app with Little Printers.app that results in the printing of the text 3 times: one time with a nice serif font and the two other times, with a sans serif font.

Would there be something that can be done to modify this behavior?

joerick commented 4 years ago

Hey @shenzo1 ! There is probably something we could improve here - currently the share extension iterates through all the attachments to a share 'item' and appends them to the 'page'. This is where that happens-

https://github.com/nordprojects/littleprinters-ios-app/blob/master/share/ShareViewController.swift#L140

Perhaps there is some documentation from Apple that would explain how better to deal with it - maybe we should be choosing the best attachment for each item instead?

shenzo1 commented 4 years ago

Hey @joerick ! Thanks for answering! I can help testing but this goes beyond my programming skills! Meanwhile, I have resorted to a shortcuts app that remove duplicates before printing.